VedaMachineDreamcast::DCInternalObject3DBuffer Class Reference

#include <VedaMachineDreamcast.h>

List of all members.


Detailed Description

Nested class that implements a 3D object as a vertex and a polygon list. You ask the creation of it with VirtualMachine::NewObject3DBuffer(), then defines its shape by filling the list you get with GetFirstVertex() and GetFirstTriangle(), then it can be rendered with VirtualMachine::RenderMesh(). In order to optimize a static shape, use VirtualMachine::CompileObject3DBufferAsStatic() In edition mode, it can be destroyed with VirtualMachine::DeleteObject3DBuffer().

Definition at line 246 of file VedaMachineDreamcast.h.

Public Member Functions

virtual void CompileAsStatic ()
 A call to CompileObject3DBufferAsStatic() will fix the current geometry of an object. It will try to use the 3D buffer compilation of a given machine, which can fasten the drawing. From that moment on, further modification to its shape will be useless.
virtual bool IsCompiledAsStatic ()
 return true is CompileAsStatic() were used.
virtual InternalVertex * GetFirstVertex ()
 Get the beginning of the vertex list. Assume the maximum number of vertex was given by NewObject3DBuffer() and can be read with GetMaximumNumberOfVertexes().
virtual InternalTriangle * GetFirstTriangle ()
 Get the beginning of the Triangle list. Assume the maximum number of Triangle was given by NewObject3DBuffer() and can be read with GetMaximumNumberOfTriangles(). last Note: the first triangle returned already use the offset given with SetNumberOfActiveTriangle(): _FirstActiveTriangleIndex.
virtual void SetNumberOfActiveTriangle (unsigned int _CurrentNumberOfTriangle, unsigned int _FirstActiveTriangleIndex=0)
 Set the number of active triangle defined in the triangle list. note the active number of vertex is actually given by the highest vertex number used by one of the active triangle. If _CurrentNumberOfTriangle is greater than GetMaximumNumberOfTriangles(), it is set to zero. _FirstActiveTriangleIndex is an optional offset in the triangle list. it allows the rendering of a mesh with multiple textures, by setting a windowing in the triangle list and using multiple calls to RenderMesh(). Default is zero, start of the list.
virtual unsigned int GetNumberOfActiveTriangle ()
 Get the number of active triangle defined by SetNumberOfActiveTriangle().
virtual unsigned int GetMaximumNumberOfVertexes ()
 the maximum number of elements in table GetFirstVertex()
virtual unsigned int GetMaximumNumberOfTriangles ()
 the maximum number of elements in table GetFirstTriangle()
virtual void SetColor (float _red, float _green, float _blue, float _alpha=1.0f)
 Set the color for the whole object. Active if object was not created with bOb3D_EnableRGB or bOb3D_EnableAlpha.

Public Attributes

InternalVertex * m_pVertexBase
 real implementation of the vertex base.
InternalTriangle * m_pTriangleBase
 real implementation of the triangle base.
unsigned int m_FirstActiveTriangleIndex
 First Active Triangle Index.
unsigned int m_NumberOfActiveTriangles
 current number of active triangle set by SetNumberOfActiveTriangle()
unsigned int m_CompiledObjectHandler
 If !=0, It is an OpenGL compiled process:.
unsigned int m_MaximumNumberOfVertexes
 the maximum number of vertex, and the size of the vertex list returned by GetFirstVertex().
unsigned int m_MaximumNumberOfTriangles
 the maximum number of Triangles, and the size of the triangle list returned by GetFirstTriangle().
unsigned int m_ExtraMemberFlags
 tells which vertex members are enabled; use VirtualMachine::bOB3d_xxx
float m_Color [4]
 main color of the object(RGBA, [0.0,1.0]): (note:there is also vertex colors)
float * m_pVertexEnvironmentUV
 DC special: environment mapping computation. nb=m_MaximumNumberOfVertexes*2.


Member Function Documentation

virtual void CompileAsStatic  )  [virtual]
 

A call to CompileObject3DBufferAsStatic() will fix the current geometry of an object. It will try to use the 3D buffer compilation of a given machine, which can fasten the drawing. From that moment on, further modification to its shape will be useless.

virtual InternalTriangle* GetFirstTriangle  )  [virtual]
 

Get the beginning of the Triangle list. Assume the maximum number of Triangle was given by NewObject3DBuffer() and can be read with GetMaximumNumberOfTriangles(). last Note: the first triangle returned already use the offset given with SetNumberOfActiveTriangle(): _FirstActiveTriangleIndex.

Returns:
a pointer to the first Vertex.

virtual InternalVertex* GetFirstVertex  )  [virtual]
 

Get the beginning of the vertex list. Assume the maximum number of vertex was given by NewObject3DBuffer() and can be read with GetMaximumNumberOfVertexes().

Returns:
a pointer to the first Vertex.

virtual unsigned int GetMaximumNumberOfTriangles  )  [virtual]
 

the maximum number of elements in table GetFirstTriangle()

Returns:
the maximum number of elements in table GetFirstTriangle()

virtual unsigned int GetMaximumNumberOfVertexes  )  [virtual]
 

the maximum number of elements in table GetFirstVertex()

Returns:
the maximum number of elements in table GetFirstVertex()

virtual unsigned int GetNumberOfActiveTriangle  )  [virtual]
 

Get the number of active triangle defined by SetNumberOfActiveTriangle().

Returns:
the number of triangle in the object.

virtual bool IsCompiledAsStatic  )  [virtual]
 

return true is CompileAsStatic() were used.

Returns:
true is CompileAsStatic() were used, false if still dynamic.

virtual void SetColor float  _red,
float  _green,
float  _blue,
float  _alpha = 1.0f
[virtual]
 

Set the color for the whole object. Active if object was not created with bOb3D_EnableRGB or bOb3D_EnableAlpha.

Parameters:
_red color component
_green color component
_blue color component
_alpha color component

virtual void SetNumberOfActiveTriangle unsigned int  _CurrentNumberOfTriangle,
unsigned int  _FirstActiveTriangleIndex = 0
[virtual]
 

Set the number of active triangle defined in the triangle list. note the active number of vertex is actually given by the highest vertex number used by one of the active triangle. If _CurrentNumberOfTriangle is greater than GetMaximumNumberOfTriangles(), it is set to zero. _FirstActiveTriangleIndex is an optional offset in the triangle list. it allows the rendering of a mesh with multiple textures, by setting a windowing in the triangle list and using multiple calls to RenderMesh(). Default is zero, start of the list.

Parameters:
_CurrentNumberOfTriangle the new number of triangle in the object.
_FirstActiveTriangleIndex optional active triangle offset in list.


Member Data Documentation

float m_Color[4]
 

main color of the object(RGBA, [0.0,1.0]): (note:there is also vertex colors)

Definition at line 327 of file VedaMachineDreamcast.h.

unsigned int m_CompiledObjectHandler
 

If !=0, It is an OpenGL compiled process:.

Definition at line 319 of file VedaMachineDreamcast.h.

unsigned int m_ExtraMemberFlags
 

tells which vertex members are enabled; use VirtualMachine::bOB3d_xxx

Definition at line 325 of file VedaMachineDreamcast.h.

unsigned int m_FirstActiveTriangleIndex
 

First Active Triangle Index.

Definition at line 315 of file VedaMachineDreamcast.h.

unsigned int m_MaximumNumberOfTriangles
 

the maximum number of Triangles, and the size of the triangle list returned by GetFirstTriangle().

Definition at line 323 of file VedaMachineDreamcast.h.

unsigned int m_MaximumNumberOfVertexes
 

the maximum number of vertex, and the size of the vertex list returned by GetFirstVertex().

Definition at line 321 of file VedaMachineDreamcast.h.

unsigned int m_NumberOfActiveTriangles
 

current number of active triangle set by SetNumberOfActiveTriangle()

Definition at line 317 of file VedaMachineDreamcast.h.

InternalTriangle* m_pTriangleBase
 

real implementation of the triangle base.

Definition at line 313 of file VedaMachineDreamcast.h.

InternalVertex* m_pVertexBase
 

real implementation of the vertex base.

Definition at line 311 of file VedaMachineDreamcast.h.

float* m_pVertexEnvironmentUV
 

DC special: environment mapping computation. nb=m_MaximumNumberOfVertexes*2.

Definition at line 329 of file VedaMachineDreamcast.h.


The documentation for this class was generated from the following file:
      /\/\        4         N         k         !         N         D
                      _______  _ __ ___  _____            ___ _ _  ____
     ___________  __//___   /________  |/    / ___________\_______/    \
    /   _   _   \/   _     /    _   /      _/_/____/    _       __     /
   /    /   /       /     /    /    \      \/     /    /    \   \     /
  \\___/___/___/    ¯    _____/_____/       ______\___/_____/\________\\
               \________/_ ___ __ l____\      /elD!  
                 http://www.m4nkind.com \____/