hello im very interested in a vector class, i think someone could programm it for me.

I will cover the expenses.




Greets
Posted on 2004-01-17 07:03:13 by Bubu-Boy
Let me know what you want in terms of functionality and I'll do it.
Posted on 2004-01-17 07:44:09 by Homer
yoou know the c++ standart vector class.

only a simple "class" with the basic functions.
how much do you want?
Posted on 2004-01-17 07:46:50 by Bubu-Boy
The standard C++ (STL) vector is a template, not just a class. vector<int> is a different class than vector<char>, to do the same in asm would not be easy.

Thomas
Posted on 2004-01-17 09:16:43 by Thomas
I'm not a C++ programmer, I can't find a standard header for CVector, there seems to be a million and one implementations, although they all share some functionality, they all differ in others. Do you want a vector manipulator class as a set of functions that operate on vectors handed to them using a pointer (vector data external to the class), one that holds a single vector internally per class object instance, or do you want a manager class that manages an array of vectors stored internally in a class object instance? Is it meant to handle several sized vectors (vec2, vec3 in 32 and in 64bit precisions) or just a VECTOR3 32bit precision class? (xyz as real4)
As for money, I'll do this free, you can owe me one, provided you don't mind me using Ultrano's ATC as the oop base, it handles inheritance and overloading without a problem. How do you feel about this class simply being a wrapper to DirectX functions? Please be more specific :)
Posted on 2004-01-17 09:18:49 by Homer
homer, it's vector and not CVector... C<whatever> is microsoft naming convention, C++ is quite different. The header file is 'vector' - yes, not 'vector.h'. And if you're not a C++ programmer, you'll probably have quite a hard time following it since it's template stuff ;)

The C++ standard vector has *nothing* to do with the kind of vectors used in math and 3d... it's a templatized dynamic-resizing array.
Posted on 2004-01-17 09:22:26 by f0dder
Thomas, I did something similar recently for my implementation of CPrimitive, which manages a dynamic FVF and 8 different structs, handling 1 to 8 texture stages (but always vec3 textured and with normals) such that the desired #texture stages describes the fvf and determines the size of stepping in the array of structs so its NOT so impossible to write one to handle several vector types, but I agree its more difficult.
Posted on 2004-01-17 09:24:26 by Homer
I wrote "class" it could even be a function-collection.
A real class/template might be impossible.



Greets
Posted on 2004-01-17 09:26:13 by Bubu-Boy
The naming convention CVector or C_Vector just means "class", similar to I being used to denote a com interface :) Just thought I'd clear that up.
AFAIK The STL is just a bunch of predefined classes that are already written up and often inherit from one another, the fact that they use "loose typecasting" ie handle multiple typedefs is not a problem for me, just more painful than writing one for a specific and predictable data type.
I ran into STL recently with my CTexture class, which uses the "static Map" functionality from STL to maintain a LinkedList of structs whose rootpointer is stored as a "static" in the class and shared among all instances. At the time, Ultrano's ATC didn't handle statics, so I cheated and used my own LL support, but it does now :)
Posted on 2004-01-17 09:30:23 by Homer
Originally posted by EvilHomer2k
AFAIK The STL is just a bunch of predefined classes that are already written up and often inherit from one another, the fact that they use "loose typecasting" ie handle multiple typedefs is not a problem for me, just more painful than writing one for a specific and predictable data type.

In C++ it's the same code for every type, so it's just as easy as writing for one specific type. Once you wrote the vector<T> template, *any* type can be used for T. If necessary it is possible to make optimal implementations for specific types but at least it already works with all types, each one seperately optimized by the compiler. It would be pretty hard to do the same in assembly but I don't think Bubu-Boy needs this kind of functionality..

Thomas
Posted on 2004-01-17 09:54:42 by Thomas
Maybe I can ask Ultrano about adding support to ATC for late typecasting to aid the writing of real templates rather than classes that contain duplicated functionality for various types - only the data members and functions that are associated with the latecast type would be included in the binary, and if more than one type was cast to the class, then more than one vtable would be generated.. it's a challenge for him :)
Posted on 2004-01-17 10:31:57 by Homer
Ultrano says no - for now - that was going to be implemented in the last version of ATC but he felt it would not be worth the trouble since even now few people have realised the benefits of oop, and fewer still choose to use ATC.
Maybe if enough people start using ATC and request support for late typecasting that could change, but for now we must work around this issue.
Posted on 2004-01-17 11:17:01 by Homer
dont understand me wrong.
I want to have a vector-like function-class.
to programm a vector in asm, that is such like c++ is impossible. - but a ....


Thomas, what do you think it could be used for?




Greets
Posted on 2004-01-17 13:15:22 by Bubu-Boy