Sack Library Documentation

Vector namespace contains methods for operating on vectors. Vectors are multidimensional scalar quantities, often used to represent coordinates and directions in space.
Name 
Description 
The following table lists functions in this documentation.  
The following table lists structs, records, enums in this documentation.  
The following table lists types in this documentation.  
The following table lists variables in this documentation.  
The following table lists macros in this documentation. 

Name 
Description 

Add two vectors together. (a1,b1,c1) + (a2,b2,c2) = (a1+a2,b1+b2,c1+c2)  

Adds a vector scaled by a scalar to another vector, results in a third vector.  

When Move is called on the transform, these callbacks are invoked so user code can get even update for motion.  

This is function sack::math::vector::Apply.  

I know this was a result  unsure how it was implented... void ApplyT (PTRANFORM pt, PTRANSFORM pt1, PTRANSFORM pt2 );  

This is function sack::math::vector::ApplyInverseR.  

This is function sack::math::vector::ApplyInverseRotation.  

This is function sack::math::vector::ApplyInverseRotationT.  

This is function sack::math::vector::ApplyInverseT.  

This is function sack::math::vector::ApplyInverseTranslation.  

This is function sack::math::vector::ApplyInverseTranslationT.  

This is function sack::math::vector::ApplyR.  

again note there was a void ApplyInverseT  

This is function sack::math::vector::ApplyRotationT.  

This is function sack::math::vector::ApplyT.  

This is function sack::math::vector::ApplyTranslation.  

This is function sack::math::vector::ApplyTranslationT.  

Resets a transform back to initial conitions.  

Returns the cos (cosine) of the angle between two vectors.  

Allocates and initializes a new transform for the user. if name is NULL, allocates an unnamed transform; otherwise the transform is created in a known namespace that can be browsed.  

This is function sack::math::vector::CreateTransformMotion.  

This is function sack::math::vector::crossproduct.  

This is function sack::math::vector::DestroyTransform.  

Returns the distance a point is as projected on another vector. The result is the distance along that vector from the origin.  

Returns the distance between two points.  

This is function sack::math::vector::dotproduct.  

Sets the forward direction speed in a PTRANSFORM.  

This is function sack::math::vector::GetAccel.  

This is function sack::math::vector::GetAxis.  

This is function sack::math::vector::GetAxisV.  

This is function sack::math::vector::GetGLMatrix.  

This is function sack::math::vector::GetOrigin.  

This is function sack::math::vector::GetOriginV.  

This is function sack::math::vector::GetSpeed.  

Inverts a vector. that is vector * 1. (a,b,c) = (a,b,c) Parameters  

Badly named function. InvertTransform turns a transform sideways, that is takes axisnormal transforms and turns them for sending to other graphic systems.  

Returns the scalar length of a vector.  

Recovers a transformation state from a file.  

Updates a transform by it's current speed and rotation assuming speed and rotation are specified in x per 1 second. Applies the fraction of time between now and the prior time move was called and scales speed and rotation by that when applying it.  

Normalizes a nonzero vector. That is the resulting length of the vector is 1.0. Modifies the vector in place.  

Dumps to syslog a current matrix. Shows both matrix content, and the cross products between the matrix that cross1 should be row 0, cross2 should be row 1 and cross3 should be row2. Pass a text name to identify this matrix from others.  

Logs the vector and leader to log. the leader is called lpName, cause it was inteded to be used by just the vector name.  

Same as PrintVectorEx, but prints to standard output using printf.  

result is the projection of project onto onto  

Sets the right direction speed in a PTRANSFORM.  

This is function sack::math::vector::RotateAbs.  

This is function sack::math::vector::RotateAbsV.  

Rotates a transform around some arbitrary axis. (any line may be used to rotate the transformation's rotation matrix)  

Rotates around the 'up' of the current rotation matrix. Same as a yaw rotation.  

Sets the current 'up' axis of a transformation. The forward axis is adjusted so that it remains perpendicular to the mast axis vs the right axis. After the forward axis is updated, the right axis is adjusted to be perpendicular to up and forward.  

Updates the current rotation matrix of a transform by a relative amount. Amounts to rotate about the x, y and z axii are given in radians.  

Update a transformation matrix by relative degress about the x axix, y axis and z axis.  

This is function sack::math::vector::RotateRight.  

This is function sack::math::vector::RotateTo.  

Provides a way to save a matrix ( direct binary file dump)  

Scales a vector by a scalar  

This is function sack::math::vector::Scale.  

Sets the acceleration applied to the speed when Move is called.  

This is function sack::math::vector::SetAxis.  

This is function sack::math::vector::SetAxisV.  

This is function sack::math::vector::SetRotation.  

Set the speed vector used when Move is applied to a PTRANSFORM.  

Set how long it takes, in milliseconds, to move 1 unit of speed vector or rotate 1 unit of rotation vector when Move is called. Each matrix maintains a last tick. If many thousands of matrixes were used, probably a batch move could be implemented that would maintain tick counts for a group of matrixes... don't know how long it takes to compute move, but timeGetTime will slow it down a lot.  

This is function sack::math::vector::showstd.  

This is function sack::math::vector::showstdEx.  

This is function sack::math::vector::ShowTransformEx.  

Returns the sin of the angle between two vectors.  

subtracts two vectors and stores the result in another vector.  

This is function sack::math::vector::Translate.  

This is function sack::math::vector::TranslateRel.  

This is function sack::math::vector::TranslateRelV.  

This is function sack::math::vector::TranslateV.  

Sets the up direction speed in a PTRANSFORM. 
Name 
Description 
a hard coded define that represents a 15 degree angle in radians.  
a hard coded define that represents a 30 degree angle in radians.  
a hard coded define that represents a 45 degree angle in radians.  
a hard coded define that represents a 5 degree angle in radians.  
This is macro sack::math::vector::CreateTransform.  
This is 'epsilon' that is used with by NearZero comparison macro.  
Macro to extract the exponent part of a RCOORD.  
Macro which can be used to make a vector's direction be exactly opposite of what it is now.  
symbol to define a double precision value for PI if it doesn't exist in the compiler.  
compares two vectors to see if they are near each other. Boundary conditions exist around 0, when the values are on opposite sides, but it's pretty good.  
Checks to see if a coordinate is 0 or near 0.  
a symbol which is effectively the largest negative value of the space, anything less than this is untrackable, and is the same as infinity.  
Special symbol that is the unit quantity.  
a symbol which is effectively the largest value of the space, anything more than this is untrackable, and is the same as infinity.  
Dumps to syslog a current matrix. Shows both matrix content, and the cross products between the matrix that cross1 should be row 0, cross2 should be row 1 and cross3 should be row2. Pass a text name to identify this matrix from others.  
Logs the vector and leader to log. the leader is called lpName, cause it was inteded to be used by just the vector name.  
Same as PrintVectorEx, but prints to standard output using printf.  
Define that an RCOORD is represented by the basic type 'double' for platforms with smaller fast floating point types, this could be float.  
A macro to get the literal bits into an unsigned value of the same size. Shift and binary operators do not apply to floating point values, but floating point values are fields of bits that represent fractional parts of integers. This gets the bits so the fields can be tested.  
should end up layering this macro based on DIMENSIONS  
copies the value of a ray into another ray  
This is function sack::math::vector::ShowTransformEx.  
THRESHOLD may be any number more than 1. eveything 0 or more makes pretty much every number which is anything like another number equal... threshold is in count of bits... therefore for 1millionth digit accuracy that would be 20 bits. 10 bits is thousanths different are near 0 bits is if the same magnitude of number... but may be quite different 10 bits is thousands different are near 1 == 1.5 1 == 1.01  
relics from fixed point math dayz.... 

Name 
Description 

This is a pure abstraction of a Line. It is used in the basis of 3d graphics.  

A representation of a rectangular 2 dimensional area.  

A ray is a type that has an origin and a direction. (It is a pair of vectors actually) 
Name 
Description 
include "../src/vectlib/vecstruc.h  
Constant pointer to a constant transform. For things like _I transformation which is the identity translation.  
 
these SHOULD be dimension relative, but we lack much code for that...  
after Move() these callbacks are invoked.  
A representation of a rectangular 2 dimensional area.  
pointer to a point.  
pointer to a constant point.  
Pointer to a constant transform.  
pointer to a constant vector.  
This is a pure abstraction of a Line. It is used in the basis of 3d graphics.  
Describes the rotation matrix for a PTRANSFORM.  
A representation of a rectangular 2 dimensional area.  
 
 
 
pointer to a vector.  
 
basic type that Vectlib is based on. This specifies a 'real' (aka float) coordinate. Combinations of coordinates create vectors and points.  
 
A vector type. Contains 3 values by default, library can handle 4 dimensional transformations(?) 
Name 
Description 
Constants for origin(0,0,0), and axii  
This is a static constant identity matrix, which can be used to initialize a matrix transform (internally).  
Specifies the coordinate system's X axis direction. static constant.  
Specifies the coordinate system's Y axis direction. static constant.  
Specifies the coordinate system's Z axis direction. static constant. 
Copyright (c) 2000+. All rights reserved.

What do you think about this topic? Send feedback!
