Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
PointGroupClass Class Reference

#include <pointgr.h>

Inherited by SegmentGroupClass.

Public Types

enum  PointModeEnum { TRIS , QUADS , SCREENSPACE }
 
enum  FlagsType { TRANSFORM }
 

Public Member Functions

 PointGroupClass (void)
 
virtual ~PointGroupClass (void)
 
PointGroupClassoperator= (const PointGroupClass &that)
 
void Set_Arrays (ShareBufferClass< Vector3 > *locs, ShareBufferClass< Vector4 > *diffuse=NULL, ShareBufferClass< unsigned int > *apt=NULL, ShareBufferClass< float > *sizes=NULL, ShareBufferClass< unsigned char > *orientations=NULL, ShareBufferClass< unsigned char > *frames=NULL, int active_point_count=-1, float vpxmin=0.0f, float vpymin=0.0f, float vpxmax=0.0f, float vpymax=0.0f)
 
void Set_Point_Size (float size)
 
float Get_Point_Size (void)
 
void Set_Point_Color (Vector3 color)
 
Vector3 Get_Point_Color (void)
 
void Set_Point_Alpha (float alpha)
 
float Get_Point_Alpha (void)
 
void Set_Point_Orientation (unsigned char orientation)
 
unsigned char Get_Point_Orientation (void)
 
void Set_Point_Frame (unsigned char frame)
 
unsigned char Get_Point_Frame (void)
 
void Set_Point_Mode (PointModeEnum mode)
 
PointModeEnum Get_Point_Mode (void)
 
void Set_Flag (FlagsType flag, bool onoff)
 
int Get_Flag (FlagsType flag)
 
void Set_Texture (TextureClass *texture)
 
TextureClassGet_Texture (void)
 
TextureClassPeek_Texture (void)
 
void Set_Shader (ShaderClass shader)
 
ShaderClass Get_Shader (void)
 
void Set_Billboard (bool shouldBillboard)
 
bool Get_Billboard (void)
 
unsigned char Get_Frame_Row_Column_Count_Log2 (void)
 
void Set_Frame_Row_Column_Count_Log2 (unsigned char frccl2)
 
int Get_Polygon_Count (void)
 
void Render (RenderInfoClass &rinfo)
 
void RenderVolumeParticle (RenderInfoClass &rinfo, unsigned int depth)
 

Static Public Member Functions

static void _Init (void)
 
static void _Shutdown (void)
 

Protected Member Functions

void Update_Arrays (Vector3 *point_loc, Vector4 *point_diffuse, float *point_size, unsigned char *point_orientation, unsigned char *point_frame, int active_points, int total_points, int &vnum, int &pnum)
 

Protected Attributes

ShareBufferClass< Vector3 > * PointLoc
 
ShareBufferClass< Vector4 > * PointDiffuse
 
ShareBufferClass< unsigned int > * APT
 
ShareBufferClass< float > * PointSize
 
ShareBufferClass< unsigned char > * PointOrientation
 
ShareBufferClass< unsigned char > * PointFrame
 
int PointCount
 
unsigned char FrameRowColumnCountLog2
 
TextureClassTexture
 
ShaderClass Shader
 
PointModeEnum PointMode
 
unsigned int Flags
 
float DefaultPointSize
 
Vector3 DefaultPointColor
 
float DefaultPointAlpha
 
unsigned char DefaultPointOrientation
 
unsigned char DefaultPointFrame
 
float VPXMin
 
float VPYMin
 
float VPXMax
 
float VPYMax
 
bool Billboard
 

Detailed Description

Definition at line 66 of file pointgr.h.

Member Enumeration Documentation

◆ FlagsType

Enumerator
TRANSFORM 

Definition at line 76 of file pointgr.h.

◆ PointModeEnum

Enumerator
TRIS 
QUADS 
SCREENSPACE 

Definition at line 70 of file pointgr.h.

Constructor & Destructor Documentation

◆ PointGroupClass()

PointGroupClass::PointGroupClass ( void )

Definition at line 151 of file pointgr.cpp.

◆ ~PointGroupClass()

PointGroupClass::~PointGroupClass ( void )
virtual

Definition at line 188 of file pointgr.cpp.

Member Function Documentation

◆ _Init()

void PointGroupClass::_Init ( void )
static
Todo
lorenzen sez: unwrap loop and use pointer arithmetic (if this gets called a lot)
Todo
lorenzen sez: umwrap and use pointers
Todo
lorenzen sez: pointer arithmetic like "++ib=vert+1"
Todo
lorenzen sez: pointers!

Definition at line 1438 of file pointgr.cpp.

◆ _Shutdown()

void PointGroupClass::_Shutdown ( void )
static

Definition at line 1602 of file pointgr.cpp.

◆ Get_Billboard()

bool PointGroupClass::Get_Billboard ( void )

Definition at line 691 of file pointgr.cpp.

◆ Get_Flag()

int PointGroupClass::Get_Flag ( FlagsType flag)

Definition at line 556 of file pointgr.cpp.

◆ Get_Frame_Row_Column_Count_Log2()

unsigned char PointGroupClass::Get_Frame_Row_Column_Count_Log2 ( void )

Definition at line 709 of file pointgr.cpp.

◆ Get_Point_Alpha()

float PointGroupClass::Get_Point_Alpha ( void )

Definition at line 407 of file pointgr.cpp.

◆ Get_Point_Color()

Vector3 PointGroupClass::Get_Point_Color ( void )

Definition at line 372 of file pointgr.cpp.

◆ Get_Point_Frame()

unsigned char PointGroupClass::Get_Point_Frame ( void )

Definition at line 483 of file pointgr.cpp.

◆ Get_Point_Mode()

PointGroupClass::PointModeEnum PointGroupClass::Get_Point_Mode ( void )

Definition at line 519 of file pointgr.cpp.

◆ Get_Point_Orientation()

unsigned char PointGroupClass::Get_Point_Orientation ( void )

Definition at line 445 of file pointgr.cpp.

◆ Get_Point_Size()

float PointGroupClass::Get_Point_Size ( void )

Definition at line 337 of file pointgr.cpp.

◆ Get_Polygon_Count()

int PointGroupClass::Get_Polygon_Count ( void )

Definition at line 746 of file pointgr.cpp.

◆ Get_Shader()

ShaderClass PointGroupClass::Get_Shader ( void )

Definition at line 657 of file pointgr.cpp.

◆ Get_Texture()

TextureClass * PointGroupClass::Get_Texture ( void )

Definition at line 592 of file pointgr.cpp.

◆ operator=()

PointGroupClass & PointGroupClass::operator= ( const PointGroupClass & that)

Definition at line 232 of file pointgr.cpp.

◆ Peek_Texture()

TextureClass * PointGroupClass::Peek_Texture ( void )

Definition at line 614 of file pointgr.cpp.

◆ Render()

void PointGroupClass::Render ( RenderInfoClass & rinfo)
Todo
lorenzen asks: is particle culling in the shader perhaps faster than in DoParticles? Fix winding and find out...
Todo
lorenzen sez: precompute pointers to indexed array elements, below
Todo
lorenzen sez: use pointer arithmetic here and a fast while loop

lorenzen fixed

Todo
lorenzen sez: if tri-based particles are not supported, elim this test
Todo
lorenzen sez: use pointer arithmetic throughout this block
Todo
Todo
lorenzen sez: delare thes locals outside this loop
Todo
Todo
lorenzen sez: use a fast while loop

Definition at line 775 of file pointgr.cpp.

◆ RenderVolumeParticle()

void PointGroupClass::RenderVolumeParticle ( RenderInfoClass & rinfo,
unsigned int depth )
Todo
lorenzen sez: precompute pointers to indexed array elements, below
Todo
lorenzen sez: use pointer arithmetic here and a fast while loop

lorenzen fixed

Todo
lorenzen sez: if tri-based particles are not supported, elim this test
Todo
lorenzen sez: use pointer arithmetic throughout this block
Todo
Todo
lorenzen sez: delare thes locals outside this loop
Todo
Todo
lorenzen sez: use a fast while loop
Todo
lorenzen sez: precompute these params, above

Definition at line 1643 of file pointgr.cpp.

◆ Set_Arrays()

void PointGroupClass::Set_Arrays ( ShareBufferClass< Vector3 > * locs,
ShareBufferClass< Vector4 > * diffuse = NULL,
ShareBufferClass< unsigned int > * apt = NULL,
ShareBufferClass< float > * sizes = NULL,
ShareBufferClass< unsigned char > * orientations = NULL,
ShareBufferClass< unsigned char > * frames = NULL,
int active_point_count = -1,
float vpxmin = 0.0f,
float vpymin = 0.0f,
float vpxmax = 0.0f,
float vpymax = 0.0f )

Definition at line 264 of file pointgr.cpp.

◆ Set_Billboard()

void PointGroupClass::Set_Billboard ( bool shouldBillboard)

Definition at line 674 of file pointgr.cpp.

◆ Set_Flag()

void PointGroupClass::Set_Flag ( FlagsType flag,
bool onoff )

Definition at line 537 of file pointgr.cpp.

◆ Set_Frame_Row_Column_Count_Log2()

void PointGroupClass::Set_Frame_Row_Column_Count_Log2 ( unsigned char frccl2)

Definition at line 728 of file pointgr.cpp.

◆ Set_Point_Alpha()

void PointGroupClass::Set_Point_Alpha ( float alpha)

Definition at line 389 of file pointgr.cpp.

◆ Set_Point_Color()

void PointGroupClass::Set_Point_Color ( Vector3 color)

Definition at line 355 of file pointgr.cpp.

◆ Set_Point_Frame()

void PointGroupClass::Set_Point_Frame ( unsigned char frame)

Definition at line 465 of file pointgr.cpp.

◆ Set_Point_Mode()

void PointGroupClass::Set_Point_Mode ( PointModeEnum mode)

Definition at line 501 of file pointgr.cpp.

◆ Set_Point_Orientation()

void PointGroupClass::Set_Point_Orientation ( unsigned char orientation)

Definition at line 427 of file pointgr.cpp.

◆ Set_Point_Size()

void PointGroupClass::Set_Point_Size ( float size)

Definition at line 319 of file pointgr.cpp.

◆ Set_Shader()

void PointGroupClass::Set_Shader ( ShaderClass shader)

Definition at line 638 of file pointgr.cpp.

◆ Set_Texture()

void PointGroupClass::Set_Texture ( TextureClass * texture)

Definition at line 574 of file pointgr.cpp.

◆ Update_Arrays()

void PointGroupClass::Update_Arrays ( Vector3 * point_loc,
Vector4 * point_diffuse,
float * point_size,
unsigned char * point_orientation,
unsigned char * point_frame,
int active_points,
int total_points,
int & vnum,
int & pnum )
protected
Todo
lorenzen sez: precompute params below
Todo
lorenzen sez: this switch statement may be done more compactly another way... look into it
Todo
lorenzen sez: use pointer arithmetic below
Todo
lorenzen sez: use pointer arithmetic below
Todo
lorenzen sez: use a quicker, unwrapped loop, and pointer arithmetic
Todo
Todo
lorenzen sez: this is a leaf function, dang it

Definition at line 1015 of file pointgr.cpp.

Member Data Documentation

◆ APT

ShareBufferClass<unsigned int>* PointGroupClass::APT
protected

Definition at line 160 of file pointgr.h.

◆ Billboard

bool PointGroupClass::Billboard
protected

Definition at line 189 of file pointgr.h.

◆ DefaultPointAlpha

float PointGroupClass::DefaultPointAlpha
protected

Definition at line 178 of file pointgr.h.

◆ DefaultPointColor

Vector3 PointGroupClass::DefaultPointColor
protected

Definition at line 177 of file pointgr.h.

◆ DefaultPointFrame

unsigned char PointGroupClass::DefaultPointFrame
protected

Definition at line 180 of file pointgr.h.

◆ DefaultPointOrientation

unsigned char PointGroupClass::DefaultPointOrientation
protected

Definition at line 179 of file pointgr.h.

◆ DefaultPointSize

float PointGroupClass::DefaultPointSize
protected

Definition at line 176 of file pointgr.h.

◆ Flags

unsigned int PointGroupClass::Flags
protected

Definition at line 175 of file pointgr.h.

◆ FrameRowColumnCountLog2

unsigned char PointGroupClass::FrameRowColumnCountLog2
protected

Definition at line 167 of file pointgr.h.

◆ PointCount

int PointGroupClass::PointCount
protected

Definition at line 164 of file pointgr.h.

◆ PointDiffuse

ShareBufferClass<Vector4>* PointGroupClass::PointDiffuse
protected

Definition at line 159 of file pointgr.h.

◆ PointFrame

ShareBufferClass<unsigned char>* PointGroupClass::PointFrame
protected

Definition at line 163 of file pointgr.h.

◆ PointLoc

ShareBufferClass<Vector3>* PointGroupClass::PointLoc
protected

Definition at line 158 of file pointgr.h.

◆ PointMode

PointModeEnum PointGroupClass::PointMode
protected

Definition at line 174 of file pointgr.h.

◆ PointOrientation

ShareBufferClass<unsigned char>* PointGroupClass::PointOrientation
protected

Definition at line 162 of file pointgr.h.

◆ PointSize

ShareBufferClass<float>* PointGroupClass::PointSize
protected

Definition at line 161 of file pointgr.h.

◆ Shader

ShaderClass PointGroupClass::Shader
protected

Definition at line 171 of file pointgr.h.

◆ Texture

TextureClass* PointGroupClass::Texture
protected

Definition at line 170 of file pointgr.h.

◆ VPXMax

float PointGroupClass::VPXMax
protected

Definition at line 186 of file pointgr.h.

◆ VPXMin

float PointGroupClass::VPXMin
protected

Definition at line 184 of file pointgr.h.

◆ VPYMax

float PointGroupClass::VPYMax
protected

Definition at line 187 of file pointgr.h.

◆ VPYMin

float PointGroupClass::VPYMin
protected

Definition at line 185 of file pointgr.h.


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