|
V-ART
|
#include <pointlight.h>
Public Member Functions | |
| PointLight () | |
| PointLight (Point4D loc, float constantAtt=1.0, float linearAtt=0.0, float quadraticAtt=0.0) | |
| void | SetAttenuation (float constant=1.0, float linear=0.0, float quadratic=0.0) |
| Sets the three attenuation factors, described on OpenGL Red Book, Chapter 5: Lighting, section Creating Light Sources. More... | |
| float | GetConstantAttenuation () const |
| float | GetLinearAttenuation () const |
| float | GetQuadraticAttenuation () const |
| virtual bool | DrawOGL (unsigned int oglLightID) const |
| Draws (sets up) a light using OpenGL commands. More... | |
| void | SetLocation (const Point4D &newLocation) |
| Point4D | GetLocation () const |
Public Member Functions inherited from VART::Light | |
| Light () | |
| Light (const Light &light) | |
| Light (float i, float ai, Color c, bool o) | |
| Light (const std::string &newDescription, float newIntensity, float newAmbientIntensity, const Color &newColor, const Point4D &newLocation) | |
| virtual | ~Light () |
| virtual SceneNode * | Copy () |
| Returns a copy of an Light. Every derived class must reimplements this method, to avoid errors with VART::SceneNode::RecursiveCopy. More... | |
| Light & | operator= (const Light &light) |
| void | SetIntensity (float i) |
| float | GetIntensity () const |
| void | SetAmbientIntensity (float ai) |
| float | GetAmbientIntensity () const |
| void | SetColor (const Color &c) |
| Color | GetColor () const |
| void | Turn (bool on_off) |
| Turns a light on or off. More... | |
| bool | IsOn () const |
| virtual bool | RecursiveBoundingBox (BoundingBox *bBox) |
| Always returns false, therefore recursive bbox does not exist. More... | |
| void | SetLocation (const Point4D &newLocation) |
| Sets the location of the light. More... | |
| Point4D | GetLocation () const |
| Transform * | GetTransform () const |
| Gets a pointer to the light transform. More... | |
| virtual void | DrawForPicking () const |
| Draws and object, setting pick info. More... | |
Public Member Functions inherited from VART::SceneNode | |
| SceneNode () | |
| Creates an uninitialized scene node. More... | |
| SceneNode (SceneNode &node) | |
| virtual | ~SceneNode () |
| SceneNode & | operator= (const SceneNode &node) |
| virtual SceneNode * | RecursiveCopy () |
| const std::string & | GetDescription () const |
| Returns a copy of the object's description. More... | |
| void | SetDescription (const std::string &desc) |
| Changes the object's description. More... | |
| void | AddChild (SceneNode &child) |
| Add a child at the end of child list. More... | |
| bool | DetachChild (SceneNode *childPtr) |
| Removes a child from the child list. More... | |
| virtual bool | DrawOGL () const |
| Recursive drawing using OpenGL commands. More... | |
| virtual TypeID | GetID () const |
| Returns type identification of the node. More... | |
| void | AutoDeleteChildren () const |
| Deletes (dealocate memory) recursively all children marked as 'autoDelete'. More... | |
| SceneNode * | FindChildByName (const std::string &name) const |
| Recusively searches its children for a given name. More... | |
| std::list< SceneNode * > | GetChilds () |
| bool | FindPathTo (SceneNode *targetPtr, SGPath *resultPtr) const |
| Search target among children. More... | |
| bool | FindPathTo (const std::string &targetName, SGPath *resultPtr) const |
| Search target among children. More... | |
| int | GetNodeTypeList (TypeID type, std::list< SceneNode * > &nodeList) |
| Find all the nodes of with typeID 'type'. More... | |
| virtual void | TraverseDepthFirst (SNOperator *operatorPtr) const |
| Process all children in depth-first order. More... | |
| virtual void | TraverseBreadthFirst (SNOperator *operatorPtr) const |
| Process all children in breadth-first order. More... | |
| virtual void | LocateDepthFirst (SNLocator *locatorPtr) const |
| Seaches for a particular scene node (depth first) More... | |
| virtual void | LocateBreadthFirst (SNLocator *locatorPtr) const |
| Seaches for a particular scene node (breadth first) More... | |
| virtual void | XmlPrintOn (std::ostream &os, unsigned int indent) const |
| Recursively outputs XML representation of the scene node. More... | |
Public Member Functions inherited from VART::MemoryObj | |
| MemoryObj () | |
| Default constructor. More... | |
| MemoryObj (const VART::MemoryObj &obj) | |
| Copy constructor. More... | |
Additional Inherited Members | |
Public Types inherited from VART::SceneNode | |
| enum | TypeID { NONE, GRAPHIC_OBJ, BOX, CONE, CURVE, BEZIER, CYLINDER, IMAGE, IMAGE_2D, VOLUME, MESH_OBJECT, SPHERE, JOINT, BIAXIAL_JOINT, CONDYLAR_JOINT, ELLIPSOID_JOINT, SADDLE_JOINT, PLANE_JOINT, POLYAXIAL_JOINT, UNIAXIAL_JOINT, HINGE_JOINT, PIVOT_JOINT, TRANSFORM } |
Static Public Member Functions inherited from VART::Light | |
| static const Light & | SUN () |
| White directional light towards negative Y. Small ambient intensity. More... | |
| static const Light & | BRIGHT_AMBIENT () |
| Strong, white ambient light. More... | |
Public Attributes inherited from VART::MemoryObj | |
| bool | autoDelete |
Static Public Attributes inherited from VART::SceneNode | |
| static bool | recursivePrinting = true |
Protected Member Functions inherited from VART::Light | |
| unsigned int | getOpenGLID (unsigned int lightID) const |
Protected Member Functions inherited from VART::SceneNode | |
| virtual bool | DrawInstanceOGL () const |
| Non-recursive drawing - should be overriden by every derived class. More... | |
| bool | RecursiveFindPathTo (SceneNode *targetPtr, SGPath *resultPtr) const |
| Recursive auxiliar method for FindPathTo. More... | |
| bool | RecursiveFindPathTo (const std::string &targetName, SGPath *resultPtr) const |
| Recursive auxiliar method for FindPathTo. More... | |
Protected Attributes inherited from VART::Light | |
| Transform * | transform |
| Point4D | location |
Protected Attributes inherited from VART::SceneNode | |
| std::list< SceneNode * > | childList |
| Child list. More... | |
| std::string | description |
| Textual identification. More... | |
| VART::PointLight::PointLight | ( | ) |
| VART::PointLight::PointLight | ( | Point4D | loc, |
| float | constantAtt = 1.0, |
||
| float | linearAtt = 0.0, |
||
| float | quadraticAtt = 0.0 |
||
| ) |
Definition at line 14 of file pointlight.cpp.
References SetAttenuation(), and SetLocation().
|
virtual |
Draws (sets up) a light using OpenGL commands.
| oglLightID | [in] OpenGL ID for light in the range 0..7. |
Reimplemented from VART::Light.
Definition at line 25 of file pointlight.cpp.
References VART::SceneNode::DrawOGL().
|
inline |
Definition at line 32 of file pointlight.h.
|
inline |
Definition at line 33 of file pointlight.h.
|
inline |
Definition at line 42 of file pointlight.h.
References VART::Light::location.
|
inline |
Definition at line 34 of file pointlight.h.
| void VART::PointLight::SetAttenuation | ( | float | constant = 1.0, |
| float | linear = 0.0, |
||
| float | quadratic = 0.0 |
||
| ) |
Sets the three attenuation factors, described on OpenGL Red Book, Chapter 5: Lighting, section Creating Light Sources.
| constant | [in] Constant attenuation factor. |
| linear | [in] Linear attenuation factor. |
| quadratic | [in] Quadratic attenuation factor. |
Definition at line 19 of file pointlight.cpp.
Referenced by PointLight().
|
inline |
Definition at line 41 of file pointlight.h.
References VART::Light::location.
Referenced by PointLight().
1.8.6