LineField Class Reference

#include <LineField.h>

Inheritance diagram for LineField:
Collider

# Public Member Functions

void constructor (Entity owner, const ColliderSpec *colliderSpec)
 Class' constructor.
override Vector3D getNormal ()
override void configureWireframe ()
 Configure the wireframe used to show the collider.
override void print (int32 x, int32 y)
void displace (fixed_t displacement)
Vector3D getCenter ()
void getVertexes (Vector3D vertexes[2])
void setNormalLength (fixed_t normalLength)

# Protected Attributes

MeshSpecmeshSpec
 Mesh used to draw the collider.
Vector3D a
 Extreme of the line that defines the line field.
Vector3D b
 Extreme of the line that defines the line field.
Vector3D normal
 Normal to the line defined by the points a and b.
fixed_t normalLength
 Length of the line field's normal.

# Additional Inherited Members

- Private Types inherited from Collider
enum  CollisionResult
enum  ColliderClassIndexes
typedef const ColliderSpec ColliderROMSpec
- Private Member Functions inherited from Collider
void constructor (Entity owner, const ColliderSpec *colliderSpec)
 Class' constructor.
override bool onEvent (ListenerObject eventFirer, uint16 eventCode)
override bool handleMessage (Telegram telegram)
override void handleCommand (int32 command, va_list args)
void enable ()
 Enable the collider for collision checks.
void disable ()
 Disable the collider for collision checks.
void setLayers (uint32 layers)
uint32 getLayers ()
void setLayersToIgnore (uint32 layersToIgnore)
uint32 getLayersToIgnore ()
void checkCollisions (bool checkCollisions)
void registerCollisions (bool registerCollisions)
CollisionResult collides (Collider collider)
void resolveCollision (const CollisionInformation *collisionInformation)
bool canMoveTowards (Vector3D displacement)
void discardCollisions ()
 Discard any registered collision.
fixed_t getCollidingFrictionCoefficient ()
void show ()
 Show the collider.
void hide ()
 Hide the collider.
virtual void resize (fixed_t sizeDelta)
- Private Attributes inherited from Collider
Vector3D position
 Displaced position.
VirtualList otherColliders
 List of colliding colliders.
uint32 layers
 Layers on which this collider live.
uint32 layersToIgnore
 Layers to ignore when checking for collisions.
Wireframe wireframe
 Wireframe to make the collider visible (mainly for debugging purposes)
bool enabled
 If false, it is ignored in all callision checks.
uint8 checkForCollisions
 If false, it doesn't check collision against other colliders.
bool registerCollisions
 If true, it registers other colliders when a collision arises.
uint8 classIndex
 Class index to avoid using __GET_CAST when checking for collisions.
bool invalidPosition
 Flag to force the computation of the collider's position.

# Detailed Description

Class LineField

Inherits from Collider

Defines a line that is sensible to collision on one of its sides.

Definition at line 35 of file LineField.h.

# Member Function Documentation

# configureWireframe()

void LineField::configureWireframe ( )
virtual

Configure the wireframe used to show the collider.

color

Transparency mode (__TRANSPARENCY_NONE, __TRANSPARENCY_EVEN or __TRANSPARENCY_ODD)

Flag to render the wireframe in interlaced mode

segments

Implements Collider.

Definition at line 92 of file LineField.c.

# constructor()

void LineField::constructor ( Entity owner,
const ColliderSpec * colliderSpec )

Class' constructor.

Definition at line 52 of file LineField.c.

# displace()

void LineField::displace ( fixed_t displacement)

Displace the line filed.

Parameters
displacementDisplacement vector

Definition at line 202 of file LineField.c.

# getCenter()

Vector3D LineField::getCenter ( )

Retrieve the line field's center point.

Returns
Line field's center point

Definition at line 210 of file LineField.c.

# getNormal()

Vector3D LineField::getNormal ( )
virtual

Retrieve the normal to the collider.

Returns
Normal to the collider

Reimplemented from Collider.

Definition at line 85 of file LineField.c.

# getVertexes()

void LineField::getVertexes ( Vector3D vertexes[2])

Retrieve the vertexes that define the line field.

Parameters
vertexesArray of vectors that define the linefied

Definition at line 225 of file LineField.c.

# print()

void LineField::print ( int32 x,
int32 y )
virtual

Print collider's state.

Parameters
xScreen x coordinate where to print
yScreen y coordinate where to print

Reimplemented from Collider.

Definition at line 172 of file LineField.c.

# setNormalLength()

void LineField::setNormalLength ( fixed_t normalLength)

Set the length of the line field's normal.

Parameters
normalLengthLength of the line field's normal

Definition at line 244 of file LineField.c.

# Member Data Documentation

# a

Vector3D LineField::a
protected

Extreme of the line that defines the line field.

Definition at line 43 of file LineField.h.

# b

Vector3D LineField::b
protected

Extreme of the line that defines the line field.

Definition at line 46 of file LineField.h.

# meshSpec

MeshSpec* LineField::meshSpec
protected

Mesh used to draw the collider.

Definition at line 40 of file LineField.h.

# normal

Vector3D LineField::normal
protected

Normal to the line defined by the points a and b.

Definition at line 49 of file LineField.h.

# normalLength

fixed_t LineField::normalLength
protected

Length of the line field's normal.

Definition at line 52 of file LineField.h.


The documentation for this class was generated from the following files:
  • VUEngine-Core/source/Component/Collider/LineField/LineField.h
  • VUEngine-Core/source/Component/Collider/LineField/LineField.c