class DVobject: public DVselect_property

The top of the DataViewer class hierarchy.

Inheritance:


Public Methods

[more] DVobject()
Contructor.
[more]virtual ~DVobject()
Default destructor.
[more]DVobject& set_translate(LCVMarray<float> &data)
Set the translation
[more]DVobject& set_translate(const float x, const float y, const float z)
Set the translation
[more]DVobject& add_translate(LCVMarray<float> &data)
Add the given translation to the translation already there.
[more]DVobject& add_translate(const float x, const float y, const float z)
Add the given translation to the translation already there.
[more]DVobject& set_rotate(LCVMarray<float> &data, const float angle, const char type='d')
is in radians ('r') or degrees ('d'-by default)
[more]DVobject& set_rotate( const float x, const float y, const float z, const float angle, const char type='d' )
is in radians ('r') or degrees ('d'-by default)
[more]DVobject& add_rotate(LCVMarray<float> &data, const float angle, const char type='d')
Add the given rotation to the rotation already there.
[more]DVobject& add_rotate( const float x, const float y, const float z, const float angle, const char type='d' )
Add the given rotation to the rotation already there.
[more]void get_translation(LCVMarray<float>&)
Get the translation
[more]void get_rotation(LCVMarray<float>&, float&)
Get the rotation
[more]virtual void draw(LCVMstack<DVproperty*>&)
The draw routine.
[more]void set_OpenGL_lighting_properties(DVlight_properties_property_item_array &lights)
A routine to set lighting properties for OpenGL
[more]void set_OpenGL_material_properties(DVmaterial_properties_property_item &material, DVcolor &color)
A routine to set material properties for OpenGL
[more]void set_OpenGL_color(DVcolor &color)
A routine to set color for OpenGL
[more]virtual DVobject& copy_child(DVobject &child)
Function to be declared in derived classes. This is only a place holder.
[more]virtual DVobject& delete_current_child()
Function to be declared in derived classes. This is only a place holder.
[more] DVobject(const DVobject &data)
Copy constructor
[more]const DVobject& operator=(const DVobject &data)
Assignment operator
[more]int operator==(const DVobject &data)
Check for equality
[more]int operator!=(const DVobject &data)
Check for not equality
[more]virtual void print(ostream &)
Virtual print function so that we can print instantiations of the various classes derived from DVobject
[more]friend ostream& operator<<(ostream &, DVobject &)
A friend routine to overload the << operator
[more]int ReadProp()
Read the object properties from a scene file.
[more]void ReadDVrotate()
Read the object rotation from a scene file.
[more]void ReadDVtranslation()
Read the object translation from a scene file.
[more]void ReadSimpleProps()
Read the object properties from a scene file A simple loop on <tt/ReadProp()/ : while it detects a simple property, it reads it.

Public

[more]
Set the rotation with an axis (data), an angle and specifying if it
[more]
Set the rotation with an axis (x,y,z), an angle and specifying if it

Protected Fields

[more]class DVcontainerbase LCVMarray<float> translation
The tranlation of the object.
[more]LCVMarray<float> rotation_axis
Set the axis about which the orientation of the object is rotated
[more]float rotation_angle
The angle about the axis by which the orientation of the object is changed
[more]LCVMarray<float> rotation_quaterions
The orientation may also be set by entering quaterions.

Protected Methods

[more]virtual DVobject* copy()
We also want a routine that returns a pointer to a copy of the object created with new.
[more]void axis_to_quat(LCVMarray<float> axis, float angle, LCVMarray<float> &quat)
A convenience routine to change vector angle format to quaternions
[more]void quat_to_axis(LCVMarray<float> quat, LCVMarray<float> &axis, float &angle)
A convenience routine to change quaterions to vector angle format
[more]void add_quat(LCVMarray<float> a, LCVMarray<float> b, LCVMarray<float> &c)
Add two quaterions a+b = c


Inherited from DVselect_property:

Public Fields

oDVcolor_select_property_item_array color
oDVpositive_float_select_property_item_array width
oDVcomplexity_int_select_property_item geometry_complexity
oDVcomplexity_int_select_property_item light_complexity
oDVscale_select_property_item scale
oDVcolor_by_data_select_property_item_array color_by_data
oDVrich_light_properties_select_property_item_array lights
oDVrich_material_properties_select_property_item_array material

Public Methods

ovoid extract_properties(DVproperty&)
ovoid default_lighting()
ovoid ReadDVColor()
ovoid ReadDVlightComp()
ovoid ReadDVgeomComp()
ovoid ReadDVscale()
ovoid ReadDVwidth()
ovoid ReadColorMap()


Documentation

The top of the DataViewer class hierarchy. All renderable objects in DataViewer inherit from this class. It contains attributes which apply to a wide range of geometrical objects, position, rotation, etc.
oclass DVcontainerbase LCVMarray<float> translation
The tranlation of the object. Normally interpreted as the center of the object.

oLCVMarray<float> rotation_axis
Set the axis about which the orientation of the object is rotated

ofloat rotation_angle
The angle about the axis by which the orientation of the object is changed

oLCVMarray<float> rotation_quaterions
The orientation may also be set by entering quaterions.

ovirtual DVobject* copy()
We also want a routine that returns a pointer to a copy of the object created with new.

ovoid axis_to_quat(LCVMarray<float> axis, float angle, LCVMarray<float> &quat)
A convenience routine to change vector angle format to quaternions

ovoid quat_to_axis(LCVMarray<float> quat, LCVMarray<float> &axis, float &angle)
A convenience routine to change quaterions to vector angle format

ovoid add_quat(LCVMarray<float> a, LCVMarray<float> b, LCVMarray<float> &c)
Add two quaterions a+b = c

o DVobject()
Contructor. Set translation to zero and rotation angle to zero.

ovirtual ~DVobject()
Default destructor. It is declared virtual so that the correct decendant destructor will get called.

oDVobject& set_translate(LCVMarray<float> &data)
Set the translation

oDVobject& set_translate(const float x, const float y, const float z)
Set the translation

oDVobject& add_translate(LCVMarray<float> &data)
Add the given translation to the translation already there.

oDVobject& add_translate(const float x, const float y, const float z)
Add the given translation to the translation already there.

o
Set the rotation with an axis (data), an angle and specifying if it

oDVobject& set_rotate(LCVMarray<float> &data, const float angle, const char type='d')
is in radians ('r') or degrees ('d'-by default)

o
Set the rotation with an axis (x,y,z), an angle and specifying if it

oDVobject& set_rotate( const float x, const float y, const float z, const float angle, const char type='d' )
is in radians ('r') or degrees ('d'-by default)

oDVobject& add_rotate(LCVMarray<float> &data, const float angle, const char type='d')
Add the given rotation to the rotation already there. It composes the existing rotation with the new one.

oDVobject& add_rotate( const float x, const float y, const float z, const float angle, const char type='d' )
Add the given rotation to the rotation already there. It composes the existing rotation with the new one.

ovoid get_translation(LCVMarray<float>&)
Get the translation

ovoid get_rotation(LCVMarray<float>&, float&)
Get the rotation

ovirtual void draw(LCVMstack<DVproperty*>&)
The draw routine. It is given a reference to the overall property stack.

ovoid set_OpenGL_lighting_properties(DVlight_properties_property_item_array &lights)
A routine to set lighting properties for OpenGL

ovoid set_OpenGL_material_properties(DVmaterial_properties_property_item &material, DVcolor &color)
A routine to set material properties for OpenGL

ovoid set_OpenGL_color(DVcolor &color)
A routine to set color for OpenGL

ovirtual DVobject& copy_child(DVobject &child)
Function to be declared in derived classes. This is only a place holder.

ovirtual DVobject& delete_current_child()
Function to be declared in derived classes. This is only a place holder.

o DVobject(const DVobject &data)
Copy constructor

oconst DVobject& operator=(const DVobject &data)
Assignment operator

oint operator==(const DVobject &data)
Check for equality

oint operator!=(const DVobject &data)
Check for not equality

ovirtual void print(ostream &)
Virtual print function so that we can print instantiations of the various classes derived from DVobject

ofriend ostream& operator<<(ostream &, DVobject &)
A friend routine to overload the << operator

oint ReadProp()
Read the object properties from a scene file. If it encounters a simple property, like a rotation, a translation or a property inherited from the <tt/DVselect_property/ class, it reads it, positions the file pointer imediatly after it, and retruns 1. If there is no such property following the pointer in the file, it returns 0.

ovoid ReadDVrotate()
Read the object rotation from a scene file. It assumes that the existence of a rotation property has been detected before.

ovoid ReadDVtranslation()
Read the object translation from a scene file. It assumes that the existence of a rotation property has been detected before.

ovoid ReadSimpleProps()
Read the object properties from a scene file A simple loop on <tt/ReadProp()/ : while it detects a simple property, it reads it. This function applies to geometrical classes that only inherit from DVobject, and not from any other class.


Direct child classes:
DVtriangle
DVquadrilateral
DVpoints_2D
DVpoints_1D
DVcontainerbase
DVaxes

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.