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

Public Member Functions

 Vertex (Vector3d pos, Vector3d normal)
 
Vertex clone ()
 
void flip ()
 
Vertex interpolate (Vertex other, double t)
 
String toStlString ()
 
StringBuilder toStlString (StringBuilder sb)
 
StringBuilder toObjString (StringBuilder sb)
 
String toObjString ()
 
Vertex transform (Transform transform)
 
Vertex transformed (Transform transform)
 
double getWeight ()
 
void setWeight (double weight)
 
int hashCode ()
 
boolean equals (Object obj)
 
String toString ()
 
double getX ()
 
double getY ()
 
double getZ ()
 

Public Attributes

Vector3d pos
 
Vector3d normal
 

Private Member Functions

 Vertex (Vector3d pos, Vector3d normal, double weight)
 

Private Attributes

double weight = 1.0
 

Detailed Description

Represents a vertex of a polygon. This class provides normal so primitives like Cube can return a smooth vertex normal, but normal is not used anywhere else.

Definition at line 44 of file Vertex.java.

Constructor & Destructor Documentation

◆ Vertex() [1/2]

eu.mihosoft.vrl.v3d.Vertex.Vertex ( Vector3d  pos,
Vector3d  normal 
)

Constructor. Creates a vertex.

Parameters
posposition
normalnormal

Definition at line 65 of file Vertex.java.

References eu.mihosoft.vrl.v3d.Vertex.normal, and eu.mihosoft.vrl.v3d.Vertex.pos.

Referenced by eu.mihosoft.vrl.v3d.Vertex.clone(), eu.mihosoft.vrl.v3d.Vertex.equals(), and eu.mihosoft.vrl.v3d.Vertex.interpolate().

◆ Vertex() [2/2]

eu.mihosoft.vrl.v3d.Vertex.Vertex ( Vector3d  pos,
Vector3d  normal,
double  weight 
)
private

Constructor. Creates a vertex.

Parameters
posposition
normalnormal
weightweight

Definition at line 78 of file Vertex.java.

References eu.mihosoft.vrl.v3d.Vertex.normal, eu.mihosoft.vrl.v3d.Vertex.pos, and eu.mihosoft.vrl.v3d.Vertex.weight.

Member Function Documentation

◆ clone()

Vertex eu.mihosoft.vrl.v3d.Vertex.clone ( )

◆ equals()

boolean eu.mihosoft.vrl.v3d.Vertex.equals ( Object  obj)

◆ flip()

void eu.mihosoft.vrl.v3d.Vertex.flip ( )

Inverts all orientation-specific data. (e.g. vertex normal).

Definition at line 95 of file Vertex.java.

References eu.mihosoft.vrl.v3d.Vector3d.negated(), and eu.mihosoft.vrl.v3d.Vertex.normal.

Here is the call graph for this function:

◆ getWeight()

double eu.mihosoft.vrl.v3d.Vertex.getWeight ( )

Gets the weight.

Returns
the weight

Definition at line 178 of file Vertex.java.

References eu.mihosoft.vrl.v3d.Vertex.weight.

◆ getX()

double eu.mihosoft.vrl.v3d.Vertex.getX ( )

◆ getY()

double eu.mihosoft.vrl.v3d.Vertex.getY ( )

◆ getZ()

double eu.mihosoft.vrl.v3d.Vertex.getZ ( )

◆ hashCode()

int eu.mihosoft.vrl.v3d.Vertex.hashCode ( )

Definition at line 195 of file Vertex.java.

◆ interpolate()

Vertex eu.mihosoft.vrl.v3d.Vertex.interpolate ( Vertex  other,
double  t 
)

Create a new vertex between this vertex and the specified vertex by linearly interpolating all properties using a parameter t.

Parameters
othervertex
tinterpolation parameter
Returns
a new vertex between this and the specified vertex

Definition at line 107 of file Vertex.java.

References eu.mihosoft.vrl.v3d.Vector3d.lerp(), eu.mihosoft.vrl.v3d.Vertex.normal, eu.mihosoft.vrl.v3d.Vertex.pos, and eu.mihosoft.vrl.v3d.Vertex.Vertex().

Referenced by eu.mihosoft.vrl.v3d.Plane.splitPolygon().

Here is the call graph for this function:

◆ setWeight()

void eu.mihosoft.vrl.v3d.Vertex.setWeight ( double  weight)

Sets the weight.

Parameters
weightthe weight to set

Definition at line 187 of file Vertex.java.

References eu.mihosoft.vrl.v3d.Vertex.weight.

◆ toObjString() [1/2]

String eu.mihosoft.vrl.v3d.Vertex.toObjString ( )

Returns this vertex in OBJ string format.

Returns
this vertex in OBJ string format

Definition at line 148 of file Vertex.java.

◆ toObjString() [2/2]

StringBuilder eu.mihosoft.vrl.v3d.Vertex.toObjString ( StringBuilder  sb)

Returns this vertex in OBJ string format.

Parameters
sbstring builder
Returns
the specified string builder

Definition at line 138 of file Vertex.java.

References eu.mihosoft.vrl.v3d.Vector3d.toObjString().

Referenced by eu.mihosoft.vrl.v3d.CSG.toObjString().

Here is the call graph for this function:

◆ toStlString() [1/2]

String eu.mihosoft.vrl.v3d.Vertex.toStlString ( )

Returns this vertex in STL string format.

Returns
this vertex in STL string format

Definition at line 117 of file Vertex.java.

References eu.mihosoft.vrl.v3d.Vector3d.toStlString().

Here is the call graph for this function:

◆ toStlString() [2/2]

StringBuilder eu.mihosoft.vrl.v3d.Vertex.toStlString ( StringBuilder  sb)

Returns this vertex in STL string format.

Parameters
sbstring builder
Returns
the specified string builder

Definition at line 127 of file Vertex.java.

References eu.mihosoft.vrl.v3d.Vector3d.toStlString().

Here is the call graph for this function:

◆ toString()

String eu.mihosoft.vrl.v3d.Vertex.toString ( )

Definition at line 223 of file Vertex.java.

References eu.mihosoft.vrl.v3d.Vertex.pos, and eu.mihosoft.vrl.v3d.Vector3d.toString().

Here is the call graph for this function:

◆ transform()

Vertex eu.mihosoft.vrl.v3d.Vertex.transform ( Transform  transform)

Applies the specified transform to this vertex.

Parameters
transformthe transform to apply
Returns
this vertex

Definition at line 158 of file Vertex.java.

References eu.mihosoft.vrl.v3d.Vertex.pos, eu.mihosoft.vrl.v3d.Vector3d.transform(), and eu.mihosoft.vrl.v3d.Vertex.weight.

Referenced by eu.mihosoft.vrl.v3d.CSG.toObjString(), and eu.mihosoft.vrl.v3d.Vertex.transformed().

Here is the call graph for this function:

◆ transformed()

Vertex eu.mihosoft.vrl.v3d.Vertex.transformed ( Transform  transform)

Applies the specified transform to a copy of this vertex.

Parameters
transformthe transform to apply
Returns
a copy of this transform

Definition at line 169 of file Vertex.java.

References eu.mihosoft.vrl.v3d.Vertex.clone(), and eu.mihosoft.vrl.v3d.Vertex.transform().

Here is the call graph for this function:

Member Data Documentation

◆ normal

Vector3d eu.mihosoft.vrl.v3d.Vertex.normal

◆ pos

Vector3d eu.mihosoft.vrl.v3d.Vertex.pos

◆ weight

double eu.mihosoft.vrl.v3d.Vertex.weight = 1.0
private

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