Jump to content

Spline script


Gabriel
 Share

Recommended Posts

I have a question for the experts Lua;-)

I try to convert the script Spline Lua in C + +, and I met before a problem of semantics of the language Lua, even more elsewhere.

 

function CreateSpline(p0,n0,p1,n1,mag)
local spline={} – spline is a table
…
– one elements of spline is a function named Interpolate
function spline:Interpolate(t,v,n) 
	-self is same as spline here ? or self is area of CreateSplin ?
	v.x = ((self.A * (t ^ 3.0)) + (self.B * (t ^ 2.0)) + (self.C * t) + self.D)
	…
	local m=n:Length() – I don’t understand this semantics 
                     -- Length as define bellow, function of spline table
                     -- ‘n’ is a parameters of Interpolate function  ‘Vect3’ and not spline !!!!
end

– one elements of spline is a function named Lenght
function spline:Length()
…
	spline:Interpolate(p,t)
	why call spline:Interpolate and not self:Interpolate ?? 
	..
	return dist
end


 

maybe he has someone who has already converted this script in C or C + +? I like that to better understand this syntax

 

Gabriel

Link to comment
Share on other sites

  • 1 month later...

Buy the cheap handbags sale with best quality from our shop now.When favored by a high-profile celebrity, a bag is suddenly more appealing.If you want to do wholesale

 

XXXXXXXXXXXXXXXXXXXXXXXXXX business, our company is your best choice with the lowest factory wholesale price and free shipping service,welcome

 

to do wholesale XXXXXXXXXXXXXXXXXXXXX business!No need to go for fake XXXXXXXXXXXXXXXXXXXXXX burberry scarf sale now as

 

we are selling this genuine XXXXXXXXXXXXXXXXXXXXXX at a fraction of the retail price.In which case, the bag has a serious

 

chance at being sold quickly and could easily get competitive bids if put up for auction.Therefore, it not only can provide you the protection from the chilly wind, but is also

 

an elegant accessory and makes you look more charming and stylish.

 

@kakanmi " go sell your **** somewhere else, what this guy is leech. If you need to squat this forum to sell your **** pffff is that it not worth a studded."

 

@josh "the wiki page and in the same state!"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...