Logo Search packages:      
Sourcecode: csound version File versions  Download package

Vector3D Class Reference

#include <Vector3D.h>

Inheritance diagram for Vector3D:

Stk

List of all members.


Detailed Description

STK 3D vector class.

This class implements a three-dimensional vector.

by Perry R. Cook, 1995 - 2004.

Definition at line 16 of file Vector3D.h.


Public Types

typedef unsigned long StkFormat

Public Member Functions

StkFloat getLength ()
 Calculate the vector length.
StkFloat getX ()
 Get the current X value.
StkFloat getY ()
 Get the current Y value.
StkFloat getZ ()
 Get the current Z value.
void setX (StkFloat x)
 Set the X value.
void setXYZ (StkFloat x, StkFloat y, StkFloat z)
 Set the X, Y, and Z values simultaniously.
void setY (StkFloat y)
 Set the Y value.
void setZ (StkFloat z)
 Set the Z value.
 Vector3D (StkFloat initX=0.0, StkFloat initY=0.0, StkFloat initZ=0.0)
 Default constructor taking optional initial X, Y, and Z values.
 ~Vector3D ()
 Class destructor.

Static Public Member Functions

static void handleError (std::string message, StkError::Type type)
 Static function for error reporting and handling using c++ strings.
static void handleError (const char *message, StkError::Type type)
 Static function for error reporting and handling using c-strings.
static void printErrors (bool status)
 Toggle display of error messages before throwing exceptions.
static std::string rawwavePath (void)
 Static method which returns the current rawwave path.
static StkFloat sampleRate (void)
 Static method which returns the current STK sample rate.
static void setRawwavePath (std::string path)
 Static method which sets the STK rawwave path.
static void setSampleRate (StkFloat rate)
 Static method which sets the STK sample rate.
static void showWarnings (bool status)
 Toggle display of WARNING and STATUS messages.
static void sleep (unsigned long milliseconds)
 Static cross-platform method to sleep for a number of milliseconds.
static void swap16 (unsigned char *ptr)
 Static method which byte-swaps a 16-bit data type.
static void swap32 (unsigned char *ptr)
 Static method which byte-swaps a 32-bit data type.
static void swap64 (unsigned char *ptr)
 Static method which byte-swaps a 64-bit data type.

Static Public Attributes

static const StkFormat STK_FLOAT32 = 0x10
static const StkFormat STK_FLOAT64 = 0x20
static const StkFormat STK_SINT16 = 0x2
static const StkFormat STK_SINT24 = 0x4
static const StkFormat STK_SINT32 = 0x8
static const StkFormat STK_SINT8 = 0x1

Protected Member Functions

void handleError (StkError::Type type)
 Internal function for error reporting which assumes message in errorString_ variable.

Protected Attributes

std::ostringstream errorString_
StkFloat myX_
StkFloat myY_
StkFloat myZ_

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index