public class Vertex
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
eu.mihosoft.vvecmath.Vector3d |
normal
Normal.
|
eu.mihosoft.vvecmath.Vector3d |
pos
Vertex position.
|
Constructor and Description |
---|
Vertex(eu.mihosoft.vvecmath.Vector3d pos,
eu.mihosoft.vvecmath.Vector3d normal)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Vertex |
clone() |
boolean |
equals(java.lang.Object obj) |
void |
flip()
Inverts all orientation-specific data.
|
double |
getWeight() |
int |
hashCode() |
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.
|
void |
setWeight(double weight) |
java.lang.String |
toObjString()
Returns this vertex in OBJ string format.
|
java.lang.StringBuilder |
toObjString(java.lang.StringBuilder sb)
Returns this vertex in OBJ string format.
|
java.lang.String |
toStlString()
Returns this vertex in STL string format.
|
java.lang.StringBuilder |
toStlString(java.lang.StringBuilder sb)
Returns this vertex in STL string format.
|
java.lang.String |
toString() |
Vertex |
transform(eu.mihosoft.vvecmath.Transform transform)
Applies the specified transform to this vertex.
|
Vertex |
transformed(eu.mihosoft.vvecmath.Transform transform)
Applies the specified transform to a copy of this vertex.
|
public eu.mihosoft.vvecmath.Vector3d pos
public eu.mihosoft.vvecmath.Vector3d normal
public Vertex(eu.mihosoft.vvecmath.Vector3d pos, eu.mihosoft.vvecmath.Vector3d normal)
pos
- positionnormal
- normalpublic Vertex clone()
clone
in class java.lang.Object
public void flip()
public Vertex interpolate(Vertex other, double t)
other
- vertext
- interpolation parameterpublic java.lang.String toStlString()
public java.lang.StringBuilder toStlString(java.lang.StringBuilder sb)
sb
- string builderpublic java.lang.StringBuilder toObjString(java.lang.StringBuilder sb)
sb
- string builderpublic java.lang.String toObjString()
public Vertex transform(eu.mihosoft.vvecmath.Transform transform)
transform
- the transform to applypublic Vertex transformed(eu.mihosoft.vvecmath.Transform transform)
transform
- the transform to applypublic double getWeight()
public void setWeight(double weight)
weight
- the weight to setpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object