BowlerKernel
Public Member Functions | Private Attributes | List of all members
eu.mihosoft.vrl.v3d.Octahedron Class Reference
Inheritance diagram for eu.mihosoft.vrl.v3d.Octahedron:
Inheritance graph
[legend]
Collaboration diagram for eu.mihosoft.vrl.v3d.Octahedron:
Collaboration graph
[legend]

Public Member Functions

 Octahedron ()
 
 Octahedron (double size)
 
 Octahedron (Vector3d center, double size)
 
List< PolygontoPolygons ()
 
Vector3d getCenter ()
 
Octahedron setCenter (Vector3d center)
 
double getRadius ()
 
void setRadius (double radius)
 
PropertyStorage getProperties ()
 
Octahedron noCenter ()
 
- Public Member Functions inherited from eu.mihosoft.vrl.v3d.Primitive
CSG toCSG ()
 

Private Attributes

Vector3d center
 
double radius
 
boolean centered = true
 
final PropertyStorage properties = new PropertyStorage()
 

Detailed Description

Definition at line 11 of file Octahedron.java.

Constructor & Destructor Documentation

◆ Octahedron() [1/3]

eu.mihosoft.vrl.v3d.Octahedron.Octahedron ( )

Constructor. Creates a new octahedron with center

[0,0,0]

and dimensions

[1,1,1]

.

Definition at line 31 of file Octahedron.java.

References eu.mihosoft.vrl.v3d.Octahedron.center, and eu.mihosoft.vrl.v3d.Octahedron.radius.

◆ Octahedron() [2/3]

eu.mihosoft.vrl.v3d.Octahedron.Octahedron ( double  size)

Constructor. Creates a new octahedron with center

[0,0,0]

and radius

size

.

Parameters
sizesize

Definition at line 42 of file Octahedron.java.

References eu.mihosoft.vrl.v3d.Octahedron.center, and eu.mihosoft.vrl.v3d.Octahedron.radius.

◆ Octahedron() [3/3]

eu.mihosoft.vrl.v3d.Octahedron.Octahedron ( Vector3d  center,
double  size 
)

Constructor. Creates a new octahedron with the specified center and radius.

Parameters
centercenter of the octahedron
sizeof the octahedron

Definition at line 54 of file Octahedron.java.

References eu.mihosoft.vrl.v3d.Octahedron.center.

Member Function Documentation

◆ getCenter()

Vector3d eu.mihosoft.vrl.v3d.Octahedron.getCenter ( )

Gets the center.

Returns
the center

Definition at line 86 of file Octahedron.java.

References eu.mihosoft.vrl.v3d.Octahedron.center.

◆ getProperties()

PropertyStorage eu.mihosoft.vrl.v3d.Octahedron.getProperties ( )

Returns the property storage of this primitive.

Returns
the property storage of this primitive

Reimplemented from eu.mihosoft.vrl.v3d.Primitive.

Definition at line 122 of file Octahedron.java.

References eu.mihosoft.vrl.v3d.Octahedron.properties.

◆ getRadius()

double eu.mihosoft.vrl.v3d.Octahedron.getRadius ( )

Gets the radius.

Returns
the radius

Definition at line 105 of file Octahedron.java.

References eu.mihosoft.vrl.v3d.Octahedron.radius.

◆ noCenter()

Octahedron eu.mihosoft.vrl.v3d.Octahedron.noCenter ( )

Defines that this octahedron will not be centered.

Returns
this octahedron

Definition at line 130 of file Octahedron.java.

References eu.mihosoft.vrl.v3d.Octahedron.centered.

◆ setCenter()

Octahedron eu.mihosoft.vrl.v3d.Octahedron.setCenter ( Vector3d  center)

Sets the center.

Parameters
centerthe center to set

Definition at line 95 of file Octahedron.java.

References eu.mihosoft.vrl.v3d.Octahedron.center.

◆ setRadius()

void eu.mihosoft.vrl.v3d.Octahedron.setRadius ( double  radius)

Sets the radius.

Parameters
radiusthe radius to set

Definition at line 114 of file Octahedron.java.

References eu.mihosoft.vrl.v3d.Octahedron.radius.

◆ toPolygons()

List<Polygon> eu.mihosoft.vrl.v3d.Octahedron.toPolygons ( )

Returns the polygons that define this primitive.

Note: this method computes the polygons each time this method is called. The polygons can be cached inside a CSG object.

Returns
a list of polygons that define this primitive

Reimplemented from eu.mihosoft.vrl.v3d.Primitive.

Definition at line 63 of file Octahedron.java.

References eu.mihosoft.vrl.v3d.CSG.getPolygons(), eu.mihosoft.vrl.v3d.ext.quickhull3d.HullUtil.hull(), eu.mihosoft.vrl.v3d.Octahedron.radius, and eu.mihosoft.vrl.v3d.CSG.scale().

Here is the call graph for this function:

Member Data Documentation

◆ center

Vector3d eu.mihosoft.vrl.v3d.Octahedron.center
private

◆ centered

boolean eu.mihosoft.vrl.v3d.Octahedron.centered = true
private

The centered.

Definition at line 23 of file Octahedron.java.

Referenced by eu.mihosoft.vrl.v3d.Octahedron.noCenter().

◆ properties

final PropertyStorage eu.mihosoft.vrl.v3d.Octahedron.properties = new PropertyStorage()
private

The properties.

Definition at line 26 of file Octahedron.java.

Referenced by eu.mihosoft.vrl.v3d.Octahedron.getProperties().

◆ radius

double eu.mihosoft.vrl.v3d.Octahedron.radius
private

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