Fovia's .NET Client/Server API
Public Member Functions | Public Attributes | List of all members
com.fovia.hdrcsrv.VECTOR3D Class Reference

Public Member Functions

VECTOR3D add (VECTOR3D var)
 
void assign (VECTOR3D copy)
 
VECTOR3D cross (VECTOR3D op)
 
double dot (VECTOR3D op)
 
double getX ()
 
double getY ()
 
double getZ ()
 
double length ()
 
VECTOR3D mul (VECTOR3D var)
 
void normalize ()
 
void read (hdrcSerializer ser) throws IOException
 
VECTOR3D scale (double scalar)
 
void setX (double x)
 
void setY (double y)
 
void setZ (double z)
 
VECTOR3D sub (VECTOR3D var)
 
String toString ()
 
 VECTOR3D ()
 
 VECTOR3D (VECTOR3D copy)
 
 VECTOR3D (VERTEX3D vtx)
 
 VECTOR3D (double nx, double ny, double nz)
 
void write (hdrcSerializer ser) throws IOException
 

Public Attributes

double x
 
double y
 
double z
 

Detailed Description

Double precision 3D vector class.

$ \left|x y z \right| $

Constructor & Destructor Documentation

com.fovia.hdrcsrv.VECTOR3D.VECTOR3D ( )
com.fovia.hdrcsrv.VECTOR3D.VECTOR3D ( VECTOR3D  copy)

Copies the contents of copy into this vector.

Parameters
copythe vector from which to copy values into this vector.

References com.fovia.hdrcsrv.VECTOR3D.assign().

com.fovia.hdrcsrv.VECTOR3D.VECTOR3D ( VERTEX3D  vtx)

Utility function to convert a VERTEX3D into a VECTOR3D. x,y,z from vtx are assigned to x,y,z in this vector respectively.

Parameters
vtxThe vertex from which to copy the x,y,z values.

References com.fovia.hdrcsrv.VECTOR3D.x, com.fovia.hdrcsrv.VECTOR3D.y, and com.fovia.hdrcsrv.VECTOR3D.z.

com.fovia.hdrcsrv.VECTOR3D.VECTOR3D ( double  nx,
double  ny,
double  nz 
)

Constructs a vector with the values nx, ny and nz.

Parameters
nxThe x value to apply to this vector.
nyThe y value to apply to this vector.
nzThe z value to apply to this vector.

References com.fovia.hdrcsrv.VECTOR3D.x, com.fovia.hdrcsrv.VECTOR3D.y, and com.fovia.hdrcsrv.VECTOR3D.z.

Member Function Documentation

VECTOR3D com.fovia.hdrcsrv.VECTOR3D.add ( VECTOR3D  var)

Returns the result of adding the vector var to this vector.

Parameters
varThe right side of the vector add operation.
Returns
The result of the vector add operation.

References com.fovia.hdrcsrv.VECTOR3D.VECTOR3D(), com.fovia.hdrcsrv.VECTOR3D.x, com.fovia.hdrcsrv.VECTOR3D.y, and com.fovia.hdrcsrv.VECTOR3D.z.

void com.fovia.hdrcsrv.VECTOR3D.assign ( VECTOR3D  copy)

Assigns the contents of copy to the member fields in this object.

Parameters
copyThe vector from which to copy values from.

References com.fovia.hdrcsrv.VECTOR3D.x, com.fovia.hdrcsrv.VECTOR3D.y, and com.fovia.hdrcsrv.VECTOR3D.z.

Referenced by com.fovia.hdrcsrv.VECTOR3D.VECTOR3D().

VECTOR3D com.fovia.hdrcsrv.VECTOR3D.cross ( VECTOR3D  op)

Returns the result of the cross product of this object and the vector op.

Parameters
opThe right hand side of the cross product operation.
Returns
The result of the cross product operation.

References com.fovia.hdrcsrv.VECTOR3D.VECTOR3D(), com.fovia.hdrcsrv.VECTOR3D.x, com.fovia.hdrcsrv.VECTOR3D.y, and com.fovia.hdrcsrv.VECTOR3D.z.

Referenced by com.fovia.hdrc.utils.hdrc3DHelpers.DICOMRefToFovia().

double com.fovia.hdrcsrv.VECTOR3D.dot ( VECTOR3D  op)

Returns the result of the dot product of this object and the vector op. The result is the cosine of the angle between the two vectors.

Parameters
opThe right hand side of the dot product operation.
Returns
The result of the dot product operation.

References com.fovia.hdrcsrv.VECTOR3D.x, com.fovia.hdrcsrv.VECTOR3D.y, and com.fovia.hdrcsrv.VECTOR3D.z.

Referenced by com.fovia.hdrc.utils.hdrc3DHelpers.isPointVisible().

double com.fovia.hdrcsrv.VECTOR3D.length ( )
VECTOR3D com.fovia.hdrcsrv.VECTOR3D.mul ( VECTOR3D  var)

Returns the result of multiplying each component of the vector var with the corresponding component from this vector.

Parameters
varThe right side of the vector multiply operation.
Returns
The result of the vector multiply operation.

References com.fovia.hdrcsrv.VECTOR3D.VECTOR3D(), com.fovia.hdrcsrv.VECTOR3D.x, com.fovia.hdrcsrv.VECTOR3D.y, and com.fovia.hdrcsrv.VECTOR3D.z.

void com.fovia.hdrcsrv.VECTOR3D.normalize ( )

Performs an in-place normalization of this vector. Note that unlike other vector operations, this is a mutable member function rather than one that returns the result. After this function completes, the result of the length() function on this vector should be roughly 1.0.

References com.fovia.hdrcsrv.VECTOR3D.length(), com.fovia.hdrcsrv.VECTOR3D.x, com.fovia.hdrcsrv.VECTOR3D.y, and com.fovia.hdrcsrv.VECTOR3D.z.

VECTOR3D com.fovia.hdrcsrv.VECTOR3D.scale ( double  scalar)

Returns the result of scaling each field in this vector by the value scalar.

Parameters
scalarThe value that each member in this vector will be scaled by.
Returns
The result of the scaling operation.

References com.fovia.hdrcsrv.VECTOR3D.VECTOR3D(), com.fovia.hdrcsrv.VECTOR3D.x, com.fovia.hdrcsrv.VECTOR3D.y, and com.fovia.hdrcsrv.VECTOR3D.z.

Referenced by com.fovia.hdrc.utils.hdrc3DHelpers.getLineOfIntersection().

VECTOR3D com.fovia.hdrcsrv.VECTOR3D.sub ( VECTOR3D  var)

Returns the result of subtracting the vector var from this vector.

Parameters
varThe right side of the vector subtract operation.
Returns
The result of the vector subtract operation.

References com.fovia.hdrcsrv.VECTOR3D.VECTOR3D(), com.fovia.hdrcsrv.VECTOR3D.x, com.fovia.hdrcsrv.VECTOR3D.y, and com.fovia.hdrcsrv.VECTOR3D.z.

String com.fovia.hdrcsrv.VECTOR3D.toString ( )

Returns a sring that describes this object.

Returns
The string that describes this object.

References com.fovia.hdrcsrv.VECTOR3D.x, com.fovia.hdrcsrv.VECTOR3D.y, and com.fovia.hdrcsrv.VECTOR3D.z.

Member Data Documentation

double com.fovia.hdrcsrv.VECTOR3D.x
double com.fovia.hdrcsrv.VECTOR3D.y
double com.fovia.hdrcsrv.VECTOR3D.z