Ahhh. Can you suggest some? Ideally, I'd like something simple and lightweight.Yes, this is C++. I posted in C++ because I didn't want to exclude any potential C++ solutions. I had considered...
Type: Posts; User: Geometrian
Ahhh. Can you suggest some? Ideally, I'd like something simple and lightweight.Yes, this is C++. I posted in C++ because I didn't want to exclude any potential C++ solutions. I had considered...
Hi,
I'm trying to write a function that prints text to the console in a custom format. I'm trying to make it cross-platform, and I am developing on Windows. Right now, all I really care about is...
Thanks. I see why that's necessary now; deleting via a pointer to the base class shouldn't work as expected--in any case, I wouldn't expect the derived class's destructor to be called.
Thanks...
Well, alrighty. I'm gonna post the minimum required to understand the code. Here goes.
glLibView.h/glLibView.cpp:
class glLibInternal_glLibView {
private:
glLibMathMatrix<float>* _matrix;...
Mmm yep. Pseudocode error. Fixed.That's what I was thinking. So why isn't it?
Hi,
Pseudocode of architecture:
class class2 {
private:
float* class_array;
public:
class2() { class_array = new float[10]; }
~class2() { delete []...
Huh. Could have sworn I'd tried that, but evidently I didn't. Thanks,
Hi,
I have a standard list<my_obj*> and I need to iterate through it and remove all the objects that have a certain parameter my_obj.time>1.0f.
I've tried a number of things, but _Crt keeps...
It depends. Generally speaking, raw datas' parameters should be normalized (i.e., your object data should have normalized geometry). When rendering, some things can mess this up--e.g. scaling,...
Ah thanks; I was wondering why it was working. I've changed everything over to use std::string now.
Thanks again, everyone.
If you normalize the two vectors, (length = 1), then dot them, you'll get a right triangle. The dot product is the projection of the vectors onto each other.
So,...
You can extend this to find the angle between two planes, by finding the angle between their normals. Also note that if you abs() the result of the dot product in the numerator, you can get the...
Hi,
Does it make sense to have a std::map<char*,blah>? It seems to me that string literals' pointers would be compared instead of the strings themselves, as would normally happen for char* str1...
Hi,
Simple question I've always wondered about:
Program 1:
for (int i=0;i<400;i++) {
float value = my_array[i];
//do something with value
}Program 2:
float value;
In OpenGL, it would probably just be GL_LINEAR (especially for magnification, where that's the only choice). But as I said, I'm concerned that casting the bool to an int might interfere with other...
Hi,
You're right, I probably should explain some of the context of the problem. The function is the constructor for a two-dimensional texture in an OpenGL utility library.
There are a whole...
Hi,
I'm working on improving my C++ skills. I'm porting over a Python library I wrote to C++. There's a function in the library, and I'm wondering how best to represent the function's arguments...
It's was written and is being read in text mode, not binary mode. It needs to be human readable.
Hi,
I'm trying to load a text file very quickly. My test file is 630KB. Presently, I'm trying to find the fastest algorithm that works. For testing purposes, all processing has been removed;...