AnimatLab  2
Test
AnimatSim::Environment::Light Class Reference

Base class for the light object. More...

#include <Light.h>

+ Inheritance diagram for AnimatSim::Environment::Light:
+ Collaboration diagram for AnimatSim::Environment::Light:

Public Member Functions

 Light (void)
 Default constructor. More...
 
virtual ~Light (void)
 Destructor. More...
 
virtual void ConstantAttenRatio (float fltVal)
 
virtual float ConstantAttenRatio ()
 
virtual void Create ()
 
virtual bool Enabled ()
 Tells whether this light is enabled. More...
 
virtual void Enabled (bool bValue)
 Enables the node. More...
 
virtual void LatitudeSegments (int iVal)
 Latitude segments. More...
 
virtual int LatitudeSegments ()
 Gets the latitude segments. More...
 
virtual void LightNumber (int iVal)
 Sets the light number. More...
 
virtual int LightNumber ()
 Gets the light number. More...
 
virtual void LinearAttenDistance (float fltVal, bool bUseScaling=true)
 
virtual float LinearAttenDistance ()
 
virtual void Load (CStdXml &oXml)
 
virtual void LongtitudeSegments (int iVal)
 Longtitude segments. More...
 
virtual int LongtitudeSegments ()
 Gets the longtitude segments. More...
 
virtual void QuadraticAttenDistance (float fltVal, bool bUseScaling=true)
 
virtual float QuadraticAttenDistance ()
 
virtual void QueryProperties (CStdPtrArray< TypeProperty > &aryProperties)
 Queries this object for a list of properties that can be changed using SetData. More...
 
virtual float Radius ()
 Gets the radius. More...
 
virtual void Radius (float fltVal, bool bUseScaling=true)
 Sets the radius. More...
 
virtual void Resize ()
 Called when this object has been resized. More...
 
virtual void Selected (bool bValue, bool bSelectMultiple)
 Selects this object. More...
 
virtual bool SetData (const std::string &strDataType, const std::string &strValue, bool bThrowError=true)
 Set a variable based on a string data type name. More...
 
virtual void SetSystemPointers (Simulator *lpSim, Structure *lpStructure, NeuralModule *lpModule, Node *lpNode, bool bVerify)
 
virtual void VisualSelectionModeChanged (int iNewMode)
 Called when the visual selection mode changed in GUI. More...
 
- Public Member Functions inherited from AnimatSim::AnimatBase
 AnimatBase ()
 Constructs an AnimatBase object. More...
 
virtual ~AnimatBase ()
 Destroys the AnimatBase object.. More...
 
virtual bool AddItem (const std::string &strItemType, const std::string &strXml, bool bThrowError=true, bool bDoNotInit=false)
 Adds a new object to this parent. More...
 
virtual void AfterResetSimulation ()
 Called after a simulation reset for some objects. More...
 
virtual long CalculateSnapshotByteSize ()
 Calculates the snapshot byte size. More...
 
virtual void Copy (CStdSerialize *lpSource)
 
virtual float * GetDataPointer (const std::string &strDataType)
 Returns a float pointer to a data item of interest in this object. More...
 
virtual NeuralModuleGetNeuralModule ()
 Gets the neural module. More...
 
virtual NodeGetNode ()
 Gets the node. More...
 
virtual SimulatorGetSimulator ()
 Gets the simulator pointer. More...
 
virtual StructureGetStructure ()
 Gets the structure for this node. More...
 
virtual bool HasProperty (const std::string &strName)
 Queries this object if it has a property with the given name. More...
 
virtual std::string ID ()
 Gets the unique GUID ID of this object. More...
 
virtual void ID (std::string strValue)
 Sets the unique GUID ID of the object. More...
 
virtual void Initialize ()
 Initializes this object. More...
 
virtual void Kill (bool bState=true)
 Kills. More...
 
virtual void Load (StdUtils::CStdXml &oXml)
 Loads the item using an XML data packet. More...
 
virtual void LoadKeyFrameSnapshot (byte *aryBytes, long &lIndex)
 Loads a key frame snapshot. More...
 
virtual std::string Name ()
 Gets the name of this object. More...
 
virtual void Name (std::string strValue)
 Sets the name of the object. Blank is acceptable. More...
 
virtual AnimatPropertyType PropertyType (const std::string &strName)
 
virtual void ReInitialize ()
 Re-initialize this object. More...
 
virtual bool RemoveItem (const std::string &strItemType, const std::string &strID, bool bThrowError=true)
 Removes a child item from this parent. More...
 
virtual void Reset ()
 Resets this object. More...
 
virtual void ResetSimulation ()
 Resets the simulation back to time 0. More...
 
virtual void RigidBodyAdded (std::string strID)
 
virtual void RigidBodyRemoved (std::string strID)
 
virtual void SaveKeyFrameSnapshot (byte *aryBytes, long &lIndex)
 Saves a key frame snapshot. More...
 
virtual bool Selected ()
 Tells if this items is selected or not. More...
 
virtual bool SetData (const std::string &strDataType, const float fltValue, bool bThrowError=true)
 Set a variable based on a string data type name. More...
 
virtual bool SetData (const std::string &strDataType, const long lValue, bool bThrowError=true)
 Set a variable based on a string data type name. More...
 
virtual void SetSystemPointers (Simulator *lpSim, Structure *lpStructure, NeuralModule *lpModule, Node *lpNode, bool bVerify)
 Sets the system pointers. More...
 
virtual void SimPausing ()
 Called just before the simulation pauses. More...
 
virtual void SimStarting ()
 Called just before the simulation starts. More...
 
virtual void SimStopping ()
 Called just before the simulation stops. More...
 
virtual void StepSimulation ()
 Step the simulation for this object. More...
 
virtual void TimeStepModified ()
 Notification method that the time step modified has been modified. Objects should recalculate any slice times as needed. More...
 
virtual std::string Type ()
 returns the string type name of this object. More...
 
virtual void Type (std::string strValue)
 Sets the class type for this object. More...
 
virtual void VerifySystemPointers ()
 Verify that system pointers have been set correctly. More...
 
- Public Member Functions inherited from AnimatSim::Environment::MovableItem
 MovableItem (void)
 Default constructor. More...
 
virtual ~MovableItem (void)
 Destructor. More...
 
virtual CStdFPoint AbsolutePosition ()
 Gets the absolute position of this body part. More...
 
virtual void AbsolutePosition (CStdFPoint &oPoint)
 Sets the absolute position of this body part. (m_oAbsPosition) More...
 
virtual void AbsolutePosition (float fltX, float fltY, float fltZ)
 Sets the absolute position of this body part. (m_oAbsPosition) More...
 
virtual void AddBodyClicked (float fltPosX, float fltPosY, float fltPosZ, float fltNormX, float fltNormY, float fltNormZ)
 Called when the user clicks on this object while the AddBody mode is active. More...
 
virtual bool AllowMouseManipulation ()
 Tells if a given part can be manipulated using the mouse and draggers. More...
 
virtual bool AllowRotateDragX ()
 Gets whether this body part can be rotated along the x-axis by the user with the drag handlers. More...
 
virtual bool AllowRotateDragY ()
 Gets whether this body part can be rotated along the y-axis by the user with the drag handlers. More...
 
virtual bool AllowRotateDragZ ()
 Gets whether this body part can be rotated along the z-axis by the user with the drag handlers. More...
 
virtual bool AllowTranslateDragX ()
 Gets whether this body part can be translated along the x-axis by the user with the drag handlers. More...
 
virtual bool AllowTranslateDragY ()
 Gets whether this body part can be translated along the y-axis by the user with the drag handlers. More...
 
virtual bool AllowTranslateDragZ ()
 Gets whether this body part can be translated along the z-axis by the user with the drag handlers. More...
 
virtual float Alpha ()
 Gets the current alpha. More...
 
virtual void Alpha (float fltAlpha)
 Sets the current alpha. More...
 
virtual CStdColorAmbient ()
 Gets the ambient color value. More...
 
virtual void Ambient (CStdColor &aryColor)
 
virtual void Ambient (float *aryColor)
 Sets the Ambient color. More...
 
virtual void Ambient (std::string strXml)
 Loads the Ambient color from an XML data packet. More...
 
virtual bool CalculateLocalPosForWorldPos (float fltWorldX, float fltWorldY, float fltWorldZ, CStdFPoint &vLocalPos)
 Calculates the local position values for matrix transform for the part to be in a specific world position. More...
 
virtual IMovableItemCallbackCallback ()
 Gets the callback interface pointer. This is an interface pointer to a callback class that allows us to notify the GUI of events that occur within the simulation. More...
 
virtual void Callback (IMovableItemCallback *lpCallback)
 Sets the callback interface pointer. This is an interface pointer to a callback class that allows us to notify the GUI of events that occur within the simulation. More...
 
virtual float CollisionsAlpha ()
 Gets the collisions alpha. More...
 
virtual void CollisionsAlpha (float fltVal)
 Sets the collisions alpha. More...
 
virtual CStdColorDiffuse ()
 Gets the diffuse color. More...
 
virtual void Diffuse (CStdColor &aryColor)
 
virtual void Diffuse (float *aryColor)
 Sets the Diffuse color. More...
 
virtual void Diffuse (std::string strXml)
 Loads the Diffuse color from an XML data packet. More...
 
virtual BoundingBox GetBoundingBox ()
 Gets the bounding box for this part. More...
 
virtual float GetBoundingRadius ()
 Gets the bounding radius of this part. More...
 
virtual CStdFPoint GetCurrentPosition ()
 Gets the current position of this part. More...
 
virtual float * GetDataPointer (const std::string &strDataType)
 
virtual float GraphicsAlpha ()
 Gets the graphics alpha. More...
 
virtual void GraphicsAlpha (float fltVal)
 Sets the graphics alpha. More...
 
virtual bool IsSelected ()
 Query if this object is selected. More...
 
virtual bool IsVisible ()
 Query if this object is visible. More...
 
virtual void IsVisible (bool bVal)
 Sets whether this part is visible or not. More...
 
virtual float JointsAlpha ()
 Gets the joints alpha. More...
 
virtual void JointsAlpha (float fltVal)
 Sets the joints alpha. More...
 
virtual std::string LocalTransformationMatrixString ()
 Returns a string representation of the transformation matrix of this object. This is primarily used to save off the transform matrix into the project file. More...
 
virtual void OrientNewPart (float fltXPos, float fltYPos, float fltZPos, float fltXNorm, float fltYNorm, float fltZNorm)
 Orients a new part based on where the parent was clicked and the normal of the surface face. More...
 
RigidBodyParent ()
 Gets the parent RigidBody of this part. More...
 
void Parent (RigidBody *lpValue)
 Sets the parent RigidBody of this part. More...
 
virtual IPhysicsMovableItemPhysicsMovableItem ()
 Gets the physics body interface pointer. This is an interface reference to the Vs version of this object. It will allow us to call methods directly in the Vs (OSG) version of the object directly without having to overload a bunch of methods in each box, sphere, etc.. More...
 
virtual void PhysicsMovableItem (IPhysicsMovableItem *lpBase)
 Sets the physics body interface pointer. This is an interface reference to the Vs version of this object. It will allow us to call methods directly in the Vs (OSG) version of the object directly without having to overload a bunch of methods in each box, sphere, etc.. More...
 
virtual CStdFPoint Position ()
 Gets the local position. (m_oPosition) More...
 
virtual void Position (CStdFPoint &oPoint, bool bUseScaling=true, bool bFireChangeEvent=false, bool bUpdateMatrix=true)
 Sets the local position. (m_oPosition) More...
 
virtual void Position (float fltX, float fltY, float fltZ, bool bUseScaling=true, bool bFireChangeEvent=false, bool bUpdateMatrix=true)
 Sets the local position. (m_oPosition) More...
 
virtual void Position (std::string strXml, bool bUseScaling=true, bool bFireChangeEvent=false, bool bUpdateMatrix=true)
 Sets the local position. (m_oPosition). This method is primarily used by the GUI to reset the local position using an xml data packet. More...
 
virtual float ReceptiveFieldsAlpha ()
 Gets the receptive fields alpha. More...
 
virtual void ReceptiveFieldsAlpha (float fltVal)
 Sets the receptive fields alpha. More...
 
virtual CStdFPoint ReportPosition ()
 Gets the reported local position. (m_oReportPosition). More...
 
virtual void ReportPosition (CStdFPoint &oPoint)
 Sets the reported local position. (m_oReportPosition). More...
 
virtual void ReportPosition (float fltX, float fltY, float fltZ)
 Sets the reported local position. (m_oReportPosition). More...
 
virtual CStdFPoint ReportRotation ()
 Gets the reported rotation of this part. (m_oReportRotation) More...
 
virtual void ReportRotation (CStdFPoint &oPoint)
 Sets the reported rotation of this part. (m_oReportRotation) More...
 
virtual void ReportRotation (float fltX, float fltY, float fltZ)
 Sets the reported rotation of this part. (m_oReportRotation) More...
 
virtual CStdFPoint ReportWorldPosition ()
 Gets the reported world position. (m_oReportWorldPosition) More...
 
virtual void ReportWorldPosition (CStdFPoint &oPoint)
 Sets the reported world position (m_oReportWorldPosition) More...
 
virtual void ReportWorldPosition (float fltX, float fltY, float fltZ)
 Sets the reported world position (m_oReportWorldPosition) More...
 
virtual CStdFPoint Rotation ()
 Gets the rotation of this body in radians. More...
 
virtual void Rotation (CStdFPoint &oPoint, bool bFireChangeEvent=false, bool bUpdateMatrix=true)
 Sets the rotation of this body in radians. (m_oRotation) More...
 
virtual void Rotation (float fltX, float fltY, float fltZ, bool bFireChangeEvent=false, bool bUpdateMatrix=true)
 Sets the rotation of this body in radians. (m_oRotation) More...
 
virtual void Rotation (std::string strXml, bool bFireChangeEvent=false, bool bUpdateMatrix=true)
 Sets the rotation of this body in radians. (m_oRotation). This method is primarily used by the GUI to reset the rotation using an xml data packet. More...
 
virtual CStdFPoint SelectedVertex ()
 Gets the relative position of the selected vertex. (m_vSelectedVertex) More...
 
virtual void SelectedVertex (CStdFPoint &vPoint, bool bFireChangeEvent=false, bool bUpdatePhysics=true)
 Sets the relative position of the selected vertex. (m_vSelectedVertex) More...
 
virtual void SelectedVertex (float fltX, float fltY, float fltZ, bool bFireChangeEvent=false, bool bUpdatePhysics=true)
 Sets the relative position of the selected vertex. (m_vSelectedVertex) More...
 
virtual void SetBoundingBox (int iIdx, float fltVal)
 Sets one dimension of the bounding box. This does nothing for all parts except a mesh. More...
 
virtual float Shininess ()
 Gets the shininess. More...
 
virtual void Shininess (float fltVal)
 Sets the shininess value. More...
 
virtual float SimulationAlpha ()
 Gets the simulation alpha. More...
 
virtual void SimulationAlpha (float fltVal)
 Sets the simulation alpha. More...
 
virtual CStdColorSpecular ()
 Gets the specular color. More...
 
virtual void Specular (CStdColor &aryColor)
 
virtual void Specular (float *aryColor)
 Sets the Specular color. More...
 
virtual void Specular (std::string strXml)
 Loads the Specular color from an XML data packet. More...
 
virtual std::string Texture ()
 Gets the texture filename. More...
 
virtual void Texture (std::string strValue)
 Sets the Texture filename. More...
 
virtual CStdFPoint UpdateAbsolutePosition ()
 
virtual void UserDefinedDraggerRadius (float fltRadius)
 User defined dragger radius. More...
 
virtual float UserDefinedDraggerRadius ()
 Gets the user defined dragger radius. More...
 
virtual int VisualSelectionType ()
 Gets the visual selection type for this part. More...
 

Static Public Member Functions

static LightCastToDerived (AnimatBase *lpBase)
 

Protected Member Functions

virtual void UpdateData ()
 Called to collect any body data for this part. More...
 
- Protected Member Functions inherited from AnimatSim::Environment::MovableItem
virtual void LoadPosition (CStdXml &oXml)
 Loads the items position. More...
 
virtual void LoadRotation (CStdXml &oXml)
 Loads the items rotation. More...
 

Protected Attributes

float m_fltConstantAttenRatio
 The constant attenuation ratio.
 
float m_fltLinearAttenDistance
 The linear attenuation distance.
 
float m_fltQuadraticAttenDistance
 The quadratic attenuation distance.
 
float m_fltRadius
 The radius of the sphere.
 
int m_iLatitudeSegments
 Number of segments along the latitude direction that are used to build the sphere.
 
int m_iLightNum
 Zero-based index of the light number. OSG only allows 8 lights.
 
int m_iLongtitudeSegments
 Number of segments along the longtitude direction that are used to build the sphere.
 
- Protected Attributes inherited from AnimatSim::AnimatBase
bool m_bEnabled
 Tells if this item is enabled or not. If it is not enabled then it is not run.
 
bool m_bSelected
 Tells whether the object is selected or not.
 
AnimatSim::Behavior::NeuralModulem_lpModule
 The pointer to this items parentNeuralModule. If this is not relevant for this object then this is NULL.
 
Nodem_lpNode
 The pointer to this items parent Node. If this is not relevant for this object then this is NULL.
 
Simulatorm_lpSim
 The pointer to a Simulation.
 
AnimatSim::Environment::Structurem_lpStructure
 The pointer to this items parent Structure. If this is not relevant for this object then this is NULL.
 
std::string m_strID
 The unique Id for this object.
 
std::string m_strName
 The name for this object.
 
std::string m_strType
 The type for this object. Examples are Box, Plane, Neuron, etc..
 
- Protected Attributes inherited from AnimatSim::Environment::MovableItem
bool m_bIsSelected
 Keeps track of whether this movable item has been selected or not.
 
bool m_bIsVisible
 
float m_fltAlpha
 The current alpha transparency for this body part.
 
float m_fltCollisionsAlpha
 The alpha transparency used in the Collisions VisualSelectionMode.
 
float m_fltGraphicsAlpha
 The alpha transparency used in the Graphics VisualSelectionMode.
 
float m_fltJointsAlpha
 The alpha transparency used in the Joints VisualSelectionMode.
 
float m_fltReceptiveFieldsAlpha
 The alpha transparency used in the Receptive Fields VisualSelectionMode.
 
float m_fltReportIsVisible
 
float m_fltShininess
 The shininess of the part. A value between 0 and 128.
 
float m_fltSimulationAlpha
 The alpha transparency used in the Simulation VisualSelectionMode.
 
float m_fltUserDefinedDraggerRadius
 User defined drag handle radius. If this is -1 then the user has not set the value and the default is used.
 
IMovableItemCallbackm_lpCallback
 
Simulatorm_lpMovableSim
 The pointer to a Simulation.
 
RigidBodym_lpParent
 
IPhysicsMovableItemm_lpPhysicsMovableItem
 
CStdFPoint m_oAbsPosition
 
CStdFPoint m_oPosition
 These are rotation and position coords relative to the parent if this is a body part.
 
CStdFPoint m_oReportPosition
 This is used for reporting the position back to the GUI. It is the position scaled for distance units.
 
CStdFPoint m_oReportRotation
 
CStdFPoint m_oReportWorldPosition
 This is used for reporting the position back to the GUI. It is the world position scaled for distance units.
 
CStdFPoint m_oRotation
 
std::string m_strTexture
 An optional texture to apply to the rigid body.
 
CStdColor m_vAmbient
 The ambient color to apply to this part. It is specified as red, green, blue, and alpha.
 
CStdColor m_vDiffuse
 The diffuse color to apply to this part. It is specified as red, green, blue, and alpha.
 
CStdFPoint m_vSelectedVertex
 The relative position of the selected vertex.
 
CStdColor m_vSpecular
 The specular color to apply to this part. It is specified as red, green, blue, and alpha.
 

Detailed Description

Base class for the light object.

This is a light object. It is used to add light to a scene.

Author
dcofer
Date
6/29/2011

Definition at line 23 of file Light.h.

Constructor & Destructor Documentation

AnimatSim::Environment::Light::Light ( void  )
AnimatSim::Environment::Light::~Light ( void  )
virtual

Destructor.

Author
dcofer
Date
3/2/2011

Definition at line 65 of file Light.cpp.

Member Function Documentation

bool AnimatSim::Environment::Light::Enabled ( )
virtual

Tells whether this light is enabled.

Author
dcofer
Date
2/24/2011
Returns
true if it enabled, false if not.

Reimplemented from AnimatSim::AnimatBase.

Definition at line 78 of file Light.cpp.

References AnimatSim::AnimatBase::m_bEnabled.

Referenced by OsgAnimatSim::Environment::OsgLight::Enabled(), VortexAnimatSim::Environment::VsLight::Enabled(), and SetData().

+ Here is the caller graph for this function:

void AnimatSim::Environment::Light::Enabled ( bool  bValue)
virtual

Enables the node.

Some types of nodes can be enabled/disabled. This sets the enabled state of the object.

Author
dcofer
Date
2/24/2011
Parameters
bValuetrue to enable.

Reimplemented from AnimatSim::AnimatBase.

Reimplemented in VortexAnimatSim::Environment::VsLight, and OsgAnimatSim::Environment::OsgLight.

Definition at line 90 of file Light.cpp.

References AnimatSim::AnimatBase::m_bEnabled.

void AnimatSim::Environment::Light::LatitudeSegments ( int  iVal)
virtual

Latitude segments.

Author
dcofer
Date
7/11/2011
Parameters
iValThe new value.

Definition at line 143 of file Light.cpp.

References m_iLatitudeSegments, Resize(), and StdUtils::Std_IsAboveMin().

+ Here is the call graph for this function:

int AnimatSim::Environment::Light::LatitudeSegments ( )
virtual

Gets the latitude segments.

Author
dcofer
Date
7/11/2011
Returns
segments.

Definition at line 158 of file Light.cpp.

References m_iLatitudeSegments.

Referenced by SetData().

+ Here is the caller graph for this function:

void AnimatSim::Environment::Light::LightNumber ( int  iVal)
virtual

Sets the light number.

Author
dcofer
Date
7/11/2011
Parameters
iValThe new value.

Definition at line 201 of file Light.cpp.

References m_iLightNum, and StdUtils::Std_IsAboveMin().

Referenced by AnimatSim::Environment::LightManager::LoadLight().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int AnimatSim::Environment::Light::LightNumber ( )
virtual

Gets the light number.

Author
dcofer
Date
7/11/2011
Returns
number.

Definition at line 215 of file Light.cpp.

References m_iLightNum.

void AnimatSim::Environment::Light::LongtitudeSegments ( int  iVal)
virtual

Longtitude segments.

Author
dcofer
Date
7/11/2011
Parameters
iValThe new value.

Definition at line 168 of file Light.cpp.

References m_iLongtitudeSegments, Resize(), and StdUtils::Std_IsAboveMin().

+ Here is the call graph for this function:

int AnimatSim::Environment::Light::LongtitudeSegments ( )
virtual

Gets the longtitude segments.

Author
dcofer
Date
7/11/2011
Returns
segments.

Definition at line 183 of file Light.cpp.

References m_iLongtitudeSegments.

Referenced by SetData().

+ Here is the caller graph for this function:

void AnimatSim::Environment::Light::QueryProperties ( CStdPtrArray< TypeProperty > &  aryProperties)
virtual

Queries this object for a list of properties that can be changed using SetData.

The method provides a list of the properties that can be set using the SetData method. It gives the property name and the type of data that should be passed to it. Valid date types are Boolean, Float, Integer, and Xml.

Author
dcofer
Date
2/22/2011
Parameters
aryNamesArray list of the property names.
strTypesArray list of the type that is associated with the cooresponding name in the list.
Returns
Nothing.

Reimplemented from AnimatSim::AnimatBase.

Definition at line 337 of file Light.cpp.

References AnimatSim::AnimatBase::QueryProperties().

+ Here is the call graph for this function:

float AnimatSim::Environment::Light::Radius ( )
virtual

Gets the radius.

Author
dcofer
Date
3/4/2011
Returns
the radius.

Definition at line 122 of file Light.cpp.

References m_fltRadius.

Referenced by SetData().

+ Here is the caller graph for this function:

void AnimatSim::Environment::Light::Radius ( float  fltVal,
bool  bUseScaling = true 
)
virtual

Sets the radius.

Author
dcofer
Date
3/4/2011
Parameters
fltValThe new value.
bUseScalingtrue to use unit scaling on entered value.

Definition at line 124 of file Light.cpp.

References AnimatSim::Simulator::InverseDistanceUnits(), m_fltRadius, AnimatSim::AnimatBase::m_lpSim, Resize(), and StdUtils::Std_IsAboveMin().

+ Here is the call graph for this function:

void AnimatSim::Environment::Light::Resize ( )
virtual

Called when this object has been resized.

This method is called when an item is resized. It is overloaded in the derived class and allows that child class to perform any necessary graphics/physics calls for the resize event.

Author
dcofer
Date
3/2/2011

Definition at line 116 of file Light.cpp.

References AnimatSim::Environment::MovableItem::m_lpPhysicsMovableItem.

Referenced by LatitudeSegments(), LongtitudeSegments(), and Radius().

+ Here is the caller graph for this function:

void AnimatSim::Environment::Light::Selected ( bool  bValue,
bool  bSelectMultiple 
)
virtual

Selects this object.

Selects or deselects this object. If selectmultiple is true and bValue is true then it will try and add this item to a group of selected items. If selectmultiple is false then the currently selected item will be deselected and this one will be selected. All of this selection logic is actually taking place in the GUI. All the simulation does is have this variable that keeps track of whether THIS item is selected or not. Determining if it should be part of a group or not is done in the GUI project workspace.

Author
dcofer
Date
2/22/2011
Parameters
bValuetrue to select, false to deselect.
bSelectMultipleIf true then this items is added as part of a group. If false then it is removed from a group.

Reimplemented from AnimatSim::AnimatBase.

Definition at line 187 of file Light.cpp.

References AnimatSim::AnimatBase::Selected().

+ Here is the call graph for this function:

bool AnimatSim::Environment::Light::SetData ( const std::string &  strDataType,
const std::string &  strValue,
bool  bThrowError = true 
)
virtual

Set a variable based on a string data type name.

This is a generic method that can be used to set any variable in an AnimatBase object by specifying the name of the variable and a string representation of that data. The GUI uses this method to set data into variables in the simulation when the user changes them in the UI. The value string can be as simple as a float or int, or as complex as an xml packet. It is the developers responsibilty to know what type of data is needed and to process it accordingly.

Author
dcofer
Date
2/22/2011
Parameters
strDataTypestring name of the data type to set.
strValueThe string value of the data. It is up to the developer to determine what this should be. For example, in most cases it is simply a float and you just have to convert it to a float and make the appropriate mutator method call. However, it can be any type of string, including an entire xml packet. It is the developers responsibility to know how to set and process the data as required.
bThrowErrortrue to throw error if there is a problem. If false then it will not return an error, just return false.
Returns
true if it succeeds, false if it fails.

Reimplemented from AnimatSim::AnimatBase.

Definition at line 278 of file Light.cpp.

References Enabled(), LatitudeSegments(), LongtitudeSegments(), Radius(), AnimatSim::AnimatBase::SetData(), StdUtils::Std_CheckString(), and StdUtils::Std_ToBool().

+ Here is the call graph for this function:

void AnimatSim::Environment::Light::UpdateData ( )
protectedvirtual

Called to collect any body data for this part.

Author
dcofer
Date
3/2/2011

Definition at line 101 of file Light.cpp.

References AnimatSim::Environment::MovableItem::m_lpPhysicsMovableItem.

void AnimatSim::Environment::Light::VisualSelectionModeChanged ( int  iNewMode)
virtual

Called when the visual selection mode changed in GUI.

In the GUI the user can select several different types of visual selection modes This method is called any time that the user switches the selection mode in the GUI. This allows us to change the current Alpha value of the objects so the display is correct.

Author
dcofer
Date
3/2/2011
Parameters
iNewModeThe new VisualSelectionMode.

Reimplemented from AnimatSim::AnimatBase.

Definition at line 264 of file Light.cpp.

References AnimatSim::Environment::MovableItem::VisualSelectionModeChanged().

+ Here is the call graph for this function:


The documentation for this class was generated from the following files: