Sphere Class Reference

#include <Sphere.h>

Inheritance diagram for Sphere:
Wireframe

# Public Types

typedef const SphereSpec SphereROMSpec

# Public Member Functions

void constructor (Entity owner, const SphereSpec *sphereSpec)
override void render (Vector3D relativePosition)
override bool draw ()
void setRadius (fixed_t radius)
fixed_t getRadius ()

# Protected Attributes

PixelVector position
 Position at which to draw the wireframe.
fixed_t radius
 Radius of the sphere.
uint16 scaledRadius
 Used radius of the sphere's to draw it.
bool drawCenter
 Flag to control the drawing of the sphere's center point.

# Additional Inherited Members

- Private Types inherited from Wireframe
typedef const WireframeSpec WireframeROMSpec
- Private Member Functions inherited from Wireframe
void constructor (Entity owner, const WireframeSpec *wireframeSpec)
void setDisplacement (Vector3D displacement)
bool isVisible ()
bool prepareForRender (Vector3D *relativePosition, const Vector3D *cameraDirection)
virtual VirtualList getVertices ()

# Detailed Description

Class Sphere

Inherits from Wireframe

Draws a cirle that represents a 3D sphere.

Definition at line 51 of file Sphere.h.

# Member Typedef Documentation

# SphereROMSpec

typedef const SphereSpec SphereROMSpec

A Sphere spec that is stored in ROM

Definition at line 40 of file Sphere.h.

# Member Function Documentation

# constructor()

void Sphere::constructor ( Entity owner,
const SphereSpec * sphereSpec )

Class' constructor

Parameters
ownerEntity to which the wireframe attaches to
sphereSpecSpecification that determines how to configure the wireframe

Definition at line 27 of file Sphere.c.

# draw()

bool Sphere::draw ( )
virtual

Draw the wireframe to the frame buffers.

Returns
True if at least one pixel is drawn; false otherwise

Implements Wireframe.

Definition at line 70 of file Sphere.c.

# getRadius()

fixed_t Sphere::getRadius ( )

Retrieve the sphere's radius.

Returns
Sphere's radius

Definition at line 97 of file Sphere.c.

# render()

void Sphere::render ( Vector3D relativePosition)
virtual

Prepare the wireframe for drawing.

Parameters
relativePositionPosition relative to the camera's

Reimplemented from Wireframe.

Definition at line 58 of file Sphere.c.

# setRadius()

void Sphere::setRadius ( fixed_t radius)

Set the sphere's radius.

Parameters
radiusSphere's radius

Definition at line 90 of file Sphere.c.

# Member Data Documentation

# drawCenter

bool Sphere::drawCenter
protected

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

Definition at line 65 of file Sphere.h.

# position

PixelVector Sphere::position
protected

Position at which to draw the wireframe.

Definition at line 56 of file Sphere.h.

# radius

fixed_t Sphere::radius
protected

Radius of the sphere.

Definition at line 59 of file Sphere.h.

# scaledRadius

uint16 Sphere::scaledRadius
protected

Used radius of the sphere's to draw it.

Definition at line 62 of file Sphere.h.


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