Ball Class Reference

#include <Ball.h>

Inheritance diagram for Ball:
Collider

# Public Member Functions

void constructor (Entity owner, const ColliderSpec *colliderSpec)
 Class' constructor.
override void resize (fixed_t sizeDelta)
override void configureWireframe ()
 Configure the wireframe used to show the collider.
override void print (int32 x, int32 y)

# Static Public Member Functions

static void project (Vector3D center, fixed_t radius, Vector3D vector, fixed_t *min, fixed_t *max)

# Protected Attributes

SphereSpecsphereSpec
 Mesh used to draw the collider.
fixed_t radius
 The radius of the ball.

# 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 Vector3D getNormal ()
- 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 Ball

Inherits from Collider

Defines a collider with the shape of a ball.

Definition at line 29 of file Ball.h.

# Member Function Documentation

# configureWireframe()

void Ball::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

Radius

Flag to control the drawing of the sphere's center point

Implements Collider.

Definition at line 88 of file Ball.c.

# constructor()

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

Class' constructor.

Definition at line 52 of file Ball.c.

# print()

void Ball::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 152 of file Ball.c.

# project()

static void Ball::project ( Vector3D center,
fixed_t radius,
Vector3D vector,
fixed_t * min,
fixed_t * max )
static

Project the diameter of a circle defined by its centers and radius onto the provided vector.

Parameters
centerCenter of the circle whose diameter is projected
radiusRadius of the circle whose diameter is projected
vectorVector onto which to project the circle's diameter
minmin: Variable to store the value of the lowest value of the projection
maxmax: Variable to store the value of the biggest value of the projection

Definition at line 28 of file Ball.c.

# resize()

void Ball::resize ( fixed_t sizeDelta)
virtual

Resize the colliders add the provided increment.

Parameters
sizeDeltaDelta to add to the collider's size

Reimplemented from Collider.

Definition at line 81 of file Ball.c.

# Member Data Documentation

# radius

fixed_t Ball::radius
protected

The radius of the ball.

Definition at line 37 of file Ball.h.

# sphereSpec

SphereSpec* Ball::sphereSpec
protected

Mesh used to draw the collider.

Definition at line 34 of file Ball.h.


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