Comments (4)
Update: I have now figured out what all the variable names represent - duh! For anyone else with a slow brain like me:
dp
refers to dot/scalar product.c
refers to a contactsm
refers to square magnitude
from cyclone-physics.
Variables have no context outside their use in statements or expressions. If you can't understand what the code is doing by reading it and running the examples, you may need to reread the chapter then run and examine the code again.
from cyclone-physics.
Variables have no context outside their use in statements or expressions. If you can't understand what the code is doing by reading it and running the examples, you may need to reread the chapter then run and examine the code again.
This code is not featured in the book, or at least I cannot find it. I am working through the book and understand the theory however those variable names are very obscure. I have added this issue just so those names can be clarified to me, they do not need to be changed. (PS: I know what a variable is...)
from cyclone-physics.
Honestly, I'm not saying that you don't know what a variable is, I'm trying to point out how you discover what it is intended for just by looking at the code. As an example, you asked what the variable 'toSt' is. For me, just by looking at its context within contactPoint(), the code at line 370 suggests that it is used to retain the difference between two points in 3D space, and that is all you really need to know. Elaboration is given in the following lines where deltas between the first and second points with that point are calculated.
That is what I mean by looking at the context over relying on names to describe what the code is doing - could the vars be named better? Sure, but they aren't. If you want then renamed you can perform a basic refactoring exercise to rename them as you see fit, but this is not something that needs fixing in the published code or for someone to take the time reminding themselves of what everything is doing in order to provide an explanation.
When you become a full-time programmer you will see what I man. Good luck! :)
from cyclone-physics.
Related Issues (20)
- Bug in BVHNode destruction HOT 1
- Is there anyway to build this example in visual studio 2015? HOT 4
- Buoyancy force appears to be calculated incorrectly HOT 15
- how to find angular velocity HOT 1
- Contacts.cpp doesn't contain implementation of applyImpulse declared in Contacts.h
- Misnomer in Rigid Body HOT 1
- Questions of calculateContactBasis() of The contacts.cpp HOT 2
- Question: Restitution causing explosive forces with friction HOT 2
- Wrong order?
- wrong calculation of total inverse mass HOT 1
- typo in contacts.h
- Does not compile for VS2019 HOT 1
- DELETE THIS
- Why dividing core.h and core.cpp?
- the implmentment of void setOrientation(const Quaternion &q) need to be transposed
- Issue with Collision Box - no rest pose is reached HOT 3
- Missing `AngledAero` force generator implementation
- Question regarding calculateDesiredDeltaVelocity
- Formula 6.5, missing factor 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cyclone-physics.