Skip to content

naming issue for ray constructor #13

@ofZach

Description

@ofZach

Granted I didn't really look at any example code, where it's very clear:

https://github.com/elliotwoods/ofxRay/blob/master/ofxRay_ofPlanePrimitiveExample/src/ofApp.cpp#L37-L41

but I found the naming scheme for ofRay a little unclear and struggled with this a little while:

Ray::Ray(ofVec3f s, ofVec3f t, bool infinite) {
	this->defined = true;
	this->s = s;
	this->t = t;
	this->infinite = infinite;
	this->width = 2.0f;
}

when I saw s / t I just thought I should supply two points on the ray, but actually I need to supply a point and a direction.... (I guess t stands for transmission... I kind of read s/t like u/v)

maybe changing the name of these variables might help?

great addon btw 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions