Objects3D.Cube Class Reference

Container for all cube data needed to draw it. More...

List of all members.

Public Member Functions

 Cube ()
byte[] GetBytes ()
 Method returning binary representation of Cube instance.
bool SetBytes (byte[] ABytes, int AOffset)
 Method setting binary representation of Cube instance.
bool Assign (Cube ACube)
 Assigns the fields of the current instance the values of the passed instance.
bool IsInBoundingBox (float AX, float AY, float AZ, float ARadius, ref float ANewY)
 Checks whether a point is in the boundin box of a cube.
void Draw (GR AGR)
 draws the cube via OpenGL

Protected Member Functions

void OnAssignedPos (Coordinate ACoordinate, float AOldX, float AOldY, float AOldZ)
void OnAssignedRot (Coordinate ACoordinate, float AOldX, float AOldY, float AOldZ)
void OnAssignedScale (Coordinate ACoordinate, float AOldX, float AOldY, float AOldZ)

Protected Attributes

byte FID = 0
Coordinate[,] FMatrix
Coordinate[] FPoints
Coordinate FPos = null
Coordinate FRot = null
Coordinate FScale = null
float FScaleMultiplier = 1.0F

Properties

static int ByteSize [get]
 Property containing the length of the binary representation of Cube.
byte ID [get, set]
 Property containing the cube ID.
float ScaleMultiplier [get, set]
 Property containing the scaling multiplier.
Coordinate Pos [get, set]
 Property containing the position.
Coordinate Rot [get, set]
 Property containing the rotation.
Coordinate Scale [get, set]
 Property containing the scaling.
Coordinate[,] Matrix [get]
 Property containing the vertex matrix of the whole cube.
Coordinate[] Points [get]
 Property containing all points that make up the cube.


Detailed Description

Container for all cube data needed to draw it.

Author:
Kevin Niehage

Definition at line 22 of file Cube.cs.


Constructor & Destructor Documentation

Objects3D.Cube.Cube (  ) 


Member Function Documentation

void Objects3D.Cube.OnAssignedPos ( Coordinate  ACoordinate,
float  AOldX,
float  AOldY,
float  AOldZ 
) [protected]

Definition at line 35 of file Cube.cs.

References Objects3D.Coordinate.Equals(), Objects3D.Cube.FPoints, and Objects3D.Cube.FPos.

Referenced by Objects3D.Cube.Cube().

void Objects3D.Cube.OnAssignedRot ( Coordinate  ACoordinate,
float  AOldX,
float  AOldY,
float  AOldZ 
) [protected]

void Objects3D.Cube.OnAssignedScale ( Coordinate  ACoordinate,
float  AOldX,
float  AOldY,
float  AOldZ 
) [protected]

byte [] Objects3D.Cube.GetBytes (  ) 

Method returning binary representation of Cube instance.

GetBytes

Author:
Kevin Niehage
Returns:
binary representation of Cube instance

Definition at line 167 of file Cube.cs.

References Objects3D.Cube.ByteSize, Objects3D.Cube.FID, Objects3D.Cube.FPos, Objects3D.Cube.FRot, Objects3D.Cube.FScale, Objects3D.Cube.FScaleMultiplier, and Objects3D.Coordinate.GetBytes().

Referenced by Objects3D.ServerCube.GetBytes(), Objects3D.Network.GetCubes(), and Objects3D.Network.GetServerCubesAsCubes().

bool Objects3D.Cube.SetBytes ( byte[]  ABytes,
int  AOffset 
)

Method setting binary representation of Cube instance.

SetBytes

Author:
Kevin Niehage
Parameters:
[in] ABytes array of byte containing the binary representation
[in] AOffset value defining from which position of the array the binary representation is to be read
Returns:
indicator if method worked correctly

Definition at line 202 of file Cube.cs.

References Objects3D.Cube.ByteSize, Objects3D.Cube.FID, Objects3D.Cube.FPos, Objects3D.Cube.FRot, Objects3D.Cube.FScale, Objects3D.Cube.ScaleMultiplier, and Objects3D.Coordinate.SetBytes().

Referenced by Objects3D.ServerCube.SetBytes().

bool Objects3D.Cube.Assign ( Cube  ACube  ) 

Assigns the fields of the current instance the values of the passed instance.

Assign

Author:
Kevin Niehage
Parameters:
[in] Cube instance
Returns:
indicator if method worked correctly

Definition at line 413 of file Cube.cs.

References Objects3D.Coordinate.Assign(), Objects3D.Cube.FPos, Objects3D.Cube.FRot, Objects3D.Cube.FScale, Objects3D.Cube.ID, Objects3D.Cube.Pos, Objects3D.Cube.Rot, Objects3D.Cube.Scale, and Objects3D.Cube.ScaleMultiplier.

Referenced by Objects3D.ServerCube.Assign().

bool Objects3D.Cube.IsInBoundingBox ( float  AX,
float  AY,
float  AZ,
float  ARadius,
ref float  ANewY 
)

Checks whether a point is in the boundin box of a cube.

IsInBoundingBox

Author:
Kevin Niehage
Parameters:
[in] X position
[in] Y position
[in] Z position
[in] radius 
[out] reference to new Y position
Returns:
indicator if passed point is in bounding box

Definition at line 446 of file Cube.cs.

References Objects3D.Cube.FPoints, Objects3D.Coordinate.X, Objects3D.Coordinate.Y, and Objects3D.Coordinate.Z.

void Objects3D.Cube.Draw ( GR  AGR  ) 

draws the cube via OpenGL

Draw

Author:
Kevin Niehage
Parameters:
[in] GR instance

Definition at line 514 of file Cube.cs.

References Objects3D.Cube.FMatrix.


Member Data Documentation

byte Objects3D.Cube.FID = 0 [protected]

Definition at line 24 of file Cube.cs.

Referenced by Objects3D.Cube.Cube(), Objects3D.Cube.GetBytes(), and Objects3D.Cube.SetBytes().

Definition at line 26 of file Cube.cs.

Referenced by Objects3D.Cube.Cube(), and Objects3D.Cube.Draw().

Coordinate Objects3D.Cube.FPos = null [protected]

Coordinate Objects3D.Cube.FRot = null [protected]

Coordinate Objects3D.Cube.FScale = null [protected]

float Objects3D.Cube.FScaleMultiplier = 1.0F [protected]


Property Documentation

Objects3D.Cube::ByteSize [static, get]

Property containing the length of the binary representation of Cube.

Author:
Kevin Niehage

Definition at line 151 of file Cube.cs.

Referenced by Objects3D.Cube.GetBytes(), and Objects3D.Cube.SetBytes().

Objects3D.Cube::ID [get, set]

Property containing the cube ID.

Author:
Kevin Niehage

Definition at line 230 of file Cube.cs.

Referenced by Objects3D.Cube.Assign().

Objects3D.Cube::ScaleMultiplier [get, set]

Property containing the scaling multiplier.

Author:
Kevin Niehage

Definition at line 250 of file Cube.cs.

Referenced by Objects3D.Cube.Assign(), Cubes3D.ServerHandler.ServerTimerTick(), Objects3D.Cube.SetBytes(), and Cubes3D.ServerHandler.StartServerReceiver().

Objects3D.Cube::Pos [get, set]

Property containing the position.

Author:
Kevin Niehage

Definition at line 284 of file Cube.cs.

Referenced by Objects3D.Cube.Assign(), Cubes3D.ServerHandler.ServerTimerTick(), and Cubes3D.ServerHandler.StartServerReceiver().

Objects3D.Cube::Rot [get, set]

Property containing the rotation.

Author:
Kevin Niehage

Definition at line 314 of file Cube.cs.

Referenced by Objects3D.Cube.Assign().

Objects3D.Cube::Scale [get, set]

Property containing the scaling.

Author:
Kevin Niehage

Definition at line 346 of file Cube.cs.

Referenced by Objects3D.Cube.Assign(), Cubes3D.ServerHandler.ServerTimerTick(), and Cubes3D.ServerHandler.StartServerReceiver().

Objects3D.Cube::Matrix [get]

Property containing the vertex matrix of the whole cube.

Author:
Kevin Niehage

Definition at line 380 of file Cube.cs.

Objects3D.Cube::Points [get]

Property containing all points that make up the cube.

Author:
Kevin Niehage

Definition at line 395 of file Cube.cs.


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

Generated on Fri Nov 14 09:05:12 2008 for Cubesł by  doxygen 1.5.6