Package eu.mihosoft.vrl.v3d
Class Vertex
java.lang.Object
eu.mihosoft.vrl.v3d.Vertex
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
void
flip()
Inverts all orientation-specific data.double
int
hashCode()
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.void
setWeight
(double weight) Returns this vertex in OBJ string format.Returns this vertex in OBJ string format.Returns this vertex in STL string format.Returns this vertex in STL string format.toString()
Applies the specified transform to this vertex.transformed
(Transform transform) Applies the specified transform to a copy of this vertex.
-
Field Details
-
pos
Vertex position. -
normal
Normal.
-
-
Constructor Details
-
Vertex
Constructor. Creates a vertex.- Parameters:
pos
- positionnormal
- normal
-
-
Method Details
-
clone
-
flip
public void flip()Inverts all orientation-specific data. (e.g. vertex normal). -
interpolate
Create a new vertex between this vertex and the specified vertex by linearly interpolating all properties using a parameter t.- Parameters:
other
- vertext
- interpolation parameter- Returns:
- a new vertex between this and the specified vertex
-
toStlString
Returns this vertex in STL string format.- Returns:
- this vertex in STL string format
-
toStlString
Returns this vertex in STL string format.- Parameters:
sb
- string builder- Returns:
- the specified string builder
-
toObjString
Returns this vertex in OBJ string format.- Parameters:
sb
- string builder- Returns:
- the specified string builder
-
toObjString
Returns this vertex in OBJ string format.- Returns:
- this vertex in OBJ string format
-
transform
Applies the specified transform to this vertex.- Parameters:
transform
- the transform to apply- Returns:
- this vertex
-
transformed
Applies the specified transform to a copy of this vertex.- Parameters:
transform
- the transform to apply- Returns:
- a copy of this transform
-
getWeight
public double getWeight()- Returns:
- the weight
-
setWeight
public void setWeight(double weight) - Parameters:
weight
- the weight to set
-
hashCode
public int hashCode() -
equals
-
toString
-