Sponsored Content
Full Discussion: Changing type name
Top Forums Programming Changing type name Post 302593745 by Corona688 on Saturday 28th of January 2012 12:37:54 PM
Old 01-28-2012
If that already works, it's equivalent to #define GetReal GetFloat

It's a global text replacement that only matches whole words, essentially, so would match a bare GetFloat nearly anywhere, including the class you want, and anywhere else you don't want too.

The usual way to change the name of a function in C++ would be to change the name of the function. Or if you really need both names, create an inline wrapper so it has two names.
Code:
float getReal(void) { return(value); }
inline float GetFloat(void) { return(GetReal()); }

 

9 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

OS Type and Version

I have seen quite a few posts recently which have launched into questions about specfic errors whose resolution depends a lot upon the OS type and version. I suggest that in the FAQ an additional entry be included, either under general board usage or posting threads, that informs the user to... (6 Replies)
Discussion started by: saabir
6 Replies

2. UNIX for Dummies Questions & Answers

you have more and one unix type?

As a formem unix newbe I Just wanted to tell you about this cool site for all you confused people. If you need to support more than one unix type: Use this one. It's a life saver. http://www.unixguide.net/unixguide.shtml here (4 Replies)
Discussion started by: sunbird
4 Replies

3. Shell Programming and Scripting

Different type of shells?

Hello there, i just want to know what are the different type of shells and the main difference betwee them. The problem is that if you try to search over the net you will find a lot of information and hence you will have no enough time to read all of them.....Anyone can help with this?? (1 Reply)
Discussion started by: charbel
1 Replies

4. UNIX for Dummies Questions & Answers

Lynx - Downloading - extension handling - changing mime type?

Using Lynx, when I try to download a .rar, it confirms I want to download and its got it as an appication/rar file. However, split archives that end in .r## (.r00, .r01 ...) are not recognized as an appication/rar file and it reads the file like a .txt or .html. How can I fix this? Thanks! (2 Replies)
Discussion started by: yitzle
2 Replies

5. Shell Programming and Scripting

Changing userID and Changing group and GID

Hello, I want to write a ksh script about changing UID and changing group with GID. There are multiple servers i want to perform that job. linux1 linux2 linux3 linux4 linux5 ...... . . . . . 1.) How can i enter "password" in script rather asking me? I was trying this... ssh... (2 Replies)
Discussion started by: deal732
2 Replies

6. Shell Programming and Scripting

String type to date type

Can one string type variable changed into the date type variable. (1 Reply)
Discussion started by: rinku
1 Replies

7. Programming

array type has incomplete element type

Dear colleagues, One of my friend have a problem with c code. While compiling a c program it displays a message like "array type has incomplete element type". Any body can provide a solution for it. Jaganadh.G (1 Reply)
Discussion started by: jaganadh
1 Replies

8. UNIX for Advanced & Expert Users

changing shell type from sh to ksh

Could someone please advise, what's the best way to changing the shell type from sh to ksh. When I login into a unix server it takes you directly to sh, is there a way of amending the .profile to use ksh instead. Or is there some other way ? Ideally it would be good to be done from the login... (10 Replies)
Discussion started by: venhart
10 Replies

9. Shell Programming and Scripting

How to know the file type

Hi I am doing some operation in which files will be dumped in Specific location. I want to know the File type.i.e i am expecting CSV files. So i want to write a script so that i can check the file which are dumped are in CSV Files.xxxx.csv format. (2 Replies)
Discussion started by: Aditya.Gurgaon
2 Replies
SbVec4d(3)							       Coin								SbVec4d(3)

NAME
SbVec4d - The SbVec4d class is a 4 dimensional vector with double precision floating point coordinates. This vector class is not by many other classes in Coin. It provides storage for a 3 dimensional homogeneoues vector (with the 4 components usually referred to as <x, y, z, w>) aswell as simple double precision floating point arithmetic operations. SYNOPSIS
#include <Inventor/SbVec4d.h> Public Member Functions SbVec4d (void) SbVec4d (const double v[4]) SbVec4d (double x, double y, double z, double w) SbVec4d (const SbVec4f &v) SbVec4d (const SbVec4b &v) SbVec4d (const SbVec4s &v) SbVec4d (const SbVec4i32 &v) SbVec4d & setValue (const double v[4]) SbVec4d & setValue (double x, double y, double z, double w) SbVec4d & setValue (const SbVec4f &v) SbVec4d & setValue (const SbVec4b &v) SbVec4d & setValue (const SbVec4s &v) SbVec4d & setValue (const SbVec4i32 &v) const double * getValue (void) const void getValue (double &x, double &y, double &z, double &w) const double & operator[] (int i) const double & operator[] (int i) const double dot (const SbVec4d &v) const SbBool equals (const SbVec4d &v, double tolerance) const void getReal (SbVec3d &v) const double length (void) const double sqrLength (void) const void negate (void) double normalize (void) SbVec4d & operator*= (double d) SbVec4d & operator/= (double d) SbVec4d & operator+= (const SbVec4d &v) SbVec4d & operator-= (const SbVec4d &v) SbVec4d operator- (void) const void print (FILE *fp) const Protected Attributes double vec [4] Related Functions (Note that these are not member functions.) SbVec4d operator* (const SbVec4d &v, double d) SbVec4d operator* (double d, const SbVec4d &v) SbVec4d operator/ (const SbVec4d &v, double d) SbVec4d operator+ (const SbVec4d &v1, const SbVec4d &v2) SbVec4d operator- (const SbVec4d &v1, const SbVec4d &v2) int operator== (const SbVec4d &v1, const SbVec4d &v2) int operator!= (const SbVec4d &v1, const SbVec4d &v2) Detailed Description The SbVec4d class is a 4 dimensional vector with double precision floating point coordinates. This vector class is not by many other classes in Coin. It provides storage for a 3 dimensional homogeneoues vector (with the 4 components usually referred to as <x, y, z, w>) aswell as simple double precision floating point arithmetic operations. See also: SbVec2s, SbVec2f, SbVec2d, SbVec3s, SbVec3f, SbVec3d, SbVec4f. Constructor &; Destructor Documentation SbVec4d::SbVec4d (void) [inline] The default constructor does nothing. The vector coordinates will be uninitialized until a call the setValue(). SbVec4d::SbVec4d (const doublev[4]) [inline] Constructs an SbVec4d instance with initial values from v. SbVec4d::SbVec4d (doublex, doubley, doublez, doublew) [inline] Constructs an SbVec4d instance with the initial homogeneous vector set to <x,y,z,w>. SbVec4d::SbVec4d (const SbVec4f &v) [inline], [explicit] Constructs an SbVec4d instance from an SbVec4f instance. SbVec4d::SbVec4d (const SbVec4b &v) [inline], [explicit] Constructs an SbVec4d instance from an SbVec4b instance. Since: Coin 2.5 SbVec4d::SbVec4d (const SbVec4s &v) [inline], [explicit] Constructs an SbVec4d instance from an SbVec4s instance. Since: Coin 2.5 SbVec4d::SbVec4d (const SbVec4i32 &v) [inline], [explicit] Constructs an SbVec4d instance from an SbVec4i32 instance. Since: Coin 2.5 Member Function Documentation SbVec4d & SbVec4d::setValue (const doublev[4]) [inline] Set new coordinates for the vector from v. Returns reference to self. See also: getValue(). SbVec4d & SbVec4d::setValue (doublex, doubley, doublez, doublew) [inline] Set new coordinates for the vector. Returns reference to self. See also: getValue(). SbVec4d & SbVec4d::setValue (const SbVec4f &v) Since: Coin 2.5 SbVec4d & SbVec4d::setValue (const SbVec4b &v) Since: Coin 2.5 SbVec4d & SbVec4d::setValue (const SbVec4s &v) Since: Coin 2.5 SbVec4d & SbVec4d::setValue (const SbVec4i32 &v) Since: Coin 2.5 const double * SbVec4d::getValue (void) const [inline] Returns a pointer to an array of four doubles containing the x, y, z and w coordinates of the vector. See also: setValue(). void SbVec4d::getValue (double &x, double &y, double &z, double &w) const [inline] Returns the x, y, z and w coordinates of the vector. See also: setValue(). double & SbVec4d::operator[] (inti) [inline] Index operator. Returns modifiable x, y, z or w component of vector. See also: getValue() and setValue(). const double & SbVec4d::operator[] (inti) const [inline] Index operator. Returns x, y, z or w component of vector. See also: getValue() and setValue(). double SbVec4d::dot (const SbVec4d &v) const [inline] Calculates and returns the result of taking the dot product of this vector and v. SbBool SbVec4d::equals (const SbVec4d &v, doubletolerance) const Compares the vector with v and returns TRUE if the distance between the vectors is smaller or equal to the square root of tolerance. The comparison is done in 4D-space, i.e. the w component of the vector is not used to make x, y and z into Cartesian coordinates first. void SbVec4d::getReal (SbVec3d &v) const Returns the vector as a Cartesian 3D vector in v. This means that the 3 first components x, y and z will be divided by the fourth, w. double SbVec4d::length (void) const Return the length of the vector in 4D space. double SbVec4d::sqrLength (void) const [inline] Return the square of the length of the vector in 4D space. void SbVec4d::negate (void) [inline] Negate the vector. double SbVec4d::normalize (void) Normalize the vector to unit length. Return value is the original length of the vector before normalization. SbVec4d & SbVec4d::operator*= (doubled) [inline] Multiply components of vector with value d. Returns reference to self. SbVec4d & SbVec4d::operator+= (const SbVec4d &v) [inline] SbVec4d & SbVec4d::operator /= (double d) Divides components of vector with value d. Returns reference to self. Adds this vector and vector v. Returns reference to self. SbVec4d & SbVec4d::operator-= (const SbVec4d &v) [inline] Subtracts vector v from this vector. Returns reference to self. SbVec4d SbVec4d::operator- (void) const [inline] Non-destructive negation operator. Returns a new SbVec4d instance which has all components negated. See also: negate(). void SbVec4d::print (FILE *fp) const Dump the state of this object to the file stream. Only works in debug version of library, method does nothing in an optimized compile. Friends And Related Function Documentation SbVec4d operator* (const SbVec4d &v, doubled) [related] Returns an SbVec4d instance which is the components of vector v multiplied with d. SbVec4d operator* (doubled, const SbVec4d &v) [related] Returns an SbVec4d instance which is the components of vector v multiplied with d. SbVec4d operator/ (const SbVec4d &v, doubled) [related] Returns an SbVec4d instance which is the components of vector v divided on the scalar factor d. SbVec4d operator+ (const SbVec4d &v1, const SbVec4d &v2) [related] Returns an SbVec4d instance which is the sum of vectors v1 and v2. SbVec4d operator- (const SbVec4d &v1, const SbVec4d &v2) [related] Returns an SbVec4d instance which is vector v2 subtracted from vector v1. int operator== (const SbVec4d &v1, const SbVec4d &v2) [related] Returns 1 if v1 and v2 are equal, 0 otherwise. See also: equals(). int operator!= (const SbVec4d &v1, const SbVec4d &v2) [related] Returns 1 if v1 and v2 are not equal, 0 if they are equal. See also: equals(). Author Generated automatically by Doxygen for Coin from the source code. Version 3.1.3 Wed May 23 2012 SbVec4d(3)
All times are GMT -4. The time now is 07:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy