CSAD
 All Classes Namespaces Functions Variables Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
csad::Transform Class Referenceabstract

Transform - a key element of the environment specifies the position of the object. More...

Inheritance diagram for csad::Transform:
csad::ContainerComponents csad::BaseObject

Public Member Functions

virtual void addChild (Transform *)=0
 insert transform to child list.
 
template<typename T >
MEMNULL _FORCEINLINE T * addComponent ()
 Adds the component of the specified type in the container if this component already exists, returns available.
 
virtual TransformChild (int id)=0
 
_FORCEINLINE unsigned int ChildCount ()
 returns number of dependent objects.
 
TransformListchildren ()
 the list of dependent objects.
 
virtual TransformcreateTransform (char *name)=0
 creates a dependent object.
 
virtual void deleteChilds ()=0
 delete all childs.
 
virtual void detachChild (Transform *child)=0
 remove transform from child list.
 
_FORCEINLINE ScenegetScene ()
 returns the scene to which an object belongs.
 
virtual TransformgetTransform (char *name)=0
 restores the dependent object by name.
 
_FORCEINLINE Transformparent ()
 returns the parent object.
 
_FORCEINLINE vector3drealPosition ()
 returns the actual position of the object
 
_FORCEINLINE quaterniondrealRotate ()
 returns the real razvorot object
 
_FORCEINLINE vector3frealScale ()
 returns the real scale
 
virtual void setChildReal (Transform *transform)=0
 
virtual void setParentReal (Transform *transform)=0
 
virtual TransformsetPosition (double x, double y, double z)=0
 
virtual TransformsetPosition (vector3d &pos)=0
 
virtual TransformsetPosition (const vector3d &pos)=0
 
virtual TransformsetRotate (const quaterniond &_rotate)=0
 
virtual TransformsetScale (float x, float y, float z)=0
 
virtual TransformsetScale (const vector3f &_scale)=0
 
virtual void setSelected (bool)=0
 specifies a choice object.
 
virtual void setSprite (bool)=0
 the reversal of the object relative to the camera.
 
virtual void setVisible (bool)=0
 sets the object visible.
 
- Public Member Functions inherited from csad::ContainerComponents
template<typename T >
_FORCEINLINE T * addComponent ()
 Adds the component of the specified type in the container if this component already exists, returns available.
 
_FORCEINLINE ComponentaddComponent (char *name)
 
_FORCEINLINE ComponentaddComponent (const char *name)
 
_FORCEINLINE iterator begin ()
 The first element of the list of components.
 
template<typename T >
_FORCEINLINE void deleteComponent ()
 Detaches the component from the container and remove the component.
 
_FORCEINLINE iterator end ()
 The final element of the list component.
 
_FORCEINLINE void freeComponents ()
 detaches and removes components
 
template<typename T >
_FORCEINLINE T * getComponent ()
 Returns the component of the given type, if it is not in a container returns 0.
 
_FORCEINLINE ComponentgetComponent (void *t)
 Returns the component of the given type, if it is not in a container returns 0.
 
_FORCEINLINE ComponentgetComponent (char *name)
 
_FORCEINLINE ComponentgetComponent (const char *name)
 
_FORCEINLINE ComponentsMaplist ()
 Returns list of Components.
 
virtual CSAD_API void quit ()
 Transfers control to the nested components quit calling each of them.
 
template<typename T >
_FORCEINLINE void removeComponent ()
 Detaches the component from a container.
 
CSAD_API void * set (unsigned _int32, void *)
 used for any interface commands.
 
CSAD_API void * setComponents (unsigned int id, void *param)
 
virtual CSAD_API void start ()
 Transfers control to the nested components start calling each of them.
 
virtual CSAD_API void update ()
 Transfers control to the nested components causing update each of them.
 
- Public Member Functions inherited from csad::BaseObject
_FORCEINLINE bool isContainer ()
 returns true if the object is a container.
 
_FORCEINLINE ParametersListread (ParametersList *data)
 read attributes object.
 
_FORCEINLINE void * type ()
 the output pointer to the typeid() of the class.
 
_FORCEINLINE void write (ParametersList *data)
 record attributes of the object.
 

Additional Inherited Members

- Public Types inherited from csad::BaseObject
enum  BASE {
  ANY = 0x00000000, EVENT = 0x00000001, TYPE = 0x00000002, CONTAINER = 0x00000003,
  MANAGER_COUNT = 0x00000004, MANAGER = 0x00000005, WRITE = 0x00000006, READ = 0x00000007,
  SELECT = 0x00000008, RUN = 0x00000009, LIST = 0x0000000A, LIST_COUNT = 0x0000000B,
  NAME = 0x0000000C, CHILD_NAME = 0x0000000D
}
 the basic format of the interface More...
 
- Static Public Member Functions inherited from csad::ContainerComponents
static CSAD_API int regClass (const char *name, const void *info, tfSTDCALL_p_FUNC_p fun)
 

Detailed Description

Transform - a key element of the environment specifies the position of the object.

Object allows you to organize position and recalculation of coordinates for building orientation of the object relative to the calculation point. This allows to minimize, and in some cases eliminate, the loss of accuracy.

For description in the configuration:

  <Scene name="myScene">
    <Transform name="the name of the transform" pos="x y z of position" rot="x y z and angle rotation" scale="x y z of scale">
      ... internal objects or components ...
    </Transform>
  </Scene>
* 
See Also
csad: scene Scene ContainerComponents

Member Function Documentation

virtual Transform* csad::Transform::Child ( int  id)
pure virtual

returns child objects by id.

Parameters
id- is a position object in child list;
virtual void csad::Transform::setChildReal ( Transform transform)
pure virtual

recalculation of the actual point down the hierarchy of objects

Parameters
transform- the object on which is made recalculation.
virtual void csad::Transform::setParentReal ( Transform transform)
pure virtual

recalculation real coordinates up and down the hierarchy of objects

Parameters
transform- the object on which is made recalculation.
virtual Transform& csad::Transform::setPosition ( double  x,
double  y,
double  z 
)
pure virtual

sets the position of the object

Parameters
x,y,z- coordinates relative to the coordinate system of the parent object
virtual Transform& csad::Transform::setPosition ( vector3d pos)
pure virtual

sets the position of the object

Parameters
pos- coordinates relative to the coordinate system of the parent object
virtual Transform& csad::Transform::setPosition ( const vector3d pos)
pure virtual

sets the position of the object

Parameters
pos- coordinates relative to the coordinate system of the parent object
virtual Transform& csad::Transform::setRotate ( const quaterniond _rotate)
pure virtual

sets the reversal of the object

Parameters
_rotate- quaternion razvorot relation to the position of the parent object
virtual Transform& csad::Transform::setScale ( float  x,
float  y,
float  z 
)
pure virtual

sets the scale of the object

Parameters
x,y,z- the scale of the axes relative to the scale of the parent object
virtual Transform& csad::Transform::setScale ( const vector3f _scale)
pure virtual

sets the scale of the object

Parameters
pos- the scale relative to the scale of the parent object