-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ofMesh:addVertex() not working with ofVec3f #49
Comments
Hi, you should convert So your code should be
|
@cuinjune, thank you! It works for addVertex, but what about color? How to convert |
You can check the |
Where I can find information about mathematical operations with glm objects? When I try call any methods of - ofelia: [string "package.preload['__.x25eb0c0.c'] = nil packag..."]:4: attempt to index a userdata value (local 'v') I mean acces to vector components or UPD: local v1 = ofVec3f(mesh:getVertex(0));
local v2 = ofVec3f(mesh:getVertex(1));
print(v1:distance(v2)); But still actual question about getting list of object methods ) |
You can access all the methods through So I'd suggest always define variables in Like the following example:
I don't think it is currently possible to directly initialize |
Hi! I am trying create ofMesh object and fill it with vertices.
I am writing in onSetup section:
In ofUpdate section:
And I got this error:
- ofelia: [string "package.preload['__.x2687c30.c'] = nil packag..."]:4: Error in Mesh_addVertex (arg 2), expected 'ofDefaultNormalType *|ofDefaultVertexType *|glm::vec3 *' got 'ofPoint *|ofVec3f *'
also if I try writing:
error:
- ofelia: [string "package.preload['__.x2687610.c'] = nil packag..."]:4: Error in Mesh_addColor (arg 2), expected 'ofDefaultColorType *|ofColor_< float > *|ofFloatColor *' got 'ofColor_< unsigned char > *|ofColor *'
It say what I give wrong type of argument, but I do as in the openFrameworks documentation.
The text was updated successfully, but these errors were encountered: