Coreform Cubit 2024.8 User Documentation

Dir

Defines a direction object. More...

#include <CubitInterfaceEx.hpp>

Public Member Functions

  Dir (double x, double y, double z>)
 
  ~Dir ()
 
double angle (Dir vec_in)
  Returns the interior of two vectors.
 
Dir cross (Dir vec2)
  Returns the cross product of thisXvec2.
 
void dir_print ()
  Print the output.
 
double distance (Dir vec_in)
  get the distance between two points
 
double dot (Dir vec2)
  Returns the dot product.
 
std::array< double, 3 > get_xyz ()
  Get an array of the vector.
 
double length ()
  Returns the length.
 
void normalize ()
  Normalize 'this' vector.
 
std::vector< CubitInterface::Dir > orthogonal_vectors ()
  Finds 2 (arbitrary) vectors that are orthogonal to this one.
 
void set (double x, double y, double z)
  Set the xyz values of the vector.
 
void set_x (double x_in)
  Set the x location of the point.
 
void set_y (double y_in)
  Set the y location of the point.
 
void set_z (double z_in)
  Set the z location of the point.
 
double x ()
  Get the x location of the point.
 
double y ()
  Get the y location of the point.
 
double z ()
  Get the z location of the point.
 

Public Attributes

double xVal
 
double yVal
 
double zVal
 

Detailed Description

Defines a direction object.

Constructor & Destructor Documentation

Dir()

Dir ( double x,
    double y,
    double z
  )    
inline
 

~Dir()

~Dir (   )  
inline
 

Member Function Documentation

angle()

double angle ( Dir vec_in )  

Returns the interior of two vectors.

return the angle is in radians

cross()

Dir cross ( Dir vec2 )  

Returns the cross product of thisXvec2.

Returns
cross product

dir_print()

void dir_print (   )  

Print the output.

distance()

double distance ( Dir vec_in )  

get the distance between two points

dot()

double dot ( Dir vec2 )  

Returns the dot product.

get_xyz()

std::array< double, 3 > get_xyz (   )  

Get an array of the vector.

length()

double length (   )  

Returns the length.

normalize()

void normalize (   )  

Normalize 'this' vector.

Returns
void

orthogonal_vectors()

std::vector< CubitInterface::Dir > orthogonal_vectors (   )  

Finds 2 (arbitrary) vectors that are orthogonal to this one.

set()

void set ( double x,
    double y,
    double z
  )    

Set the xyz values of the vector.

Returns
void

set_x()

void set_x ( double x_in )  

Set the x location of the point.

Parameters
x_in the new x value

set_y()

void set_y ( double y_in )  

Set the y location of the point.

Parameters
y_in the new y value

set_z()

void set_z ( double z_in )  

Set the z location of the point.

Parameters
z_in the new z value

x()

double x (   )  

Get the x location of the point.

Returns
x value
See also
y(), z()

y()

double y (   )  

Get the y location of the point.

Returns
y value
See also
x(), z()

z()

double z (   )  

Get the z location of the point.

Returns
z value
See also
y(), x()

Member Data Documentation

xVal

double xVal
 

yVal

double yVal
 

zVal

double zVal