x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

misunderstanding on EvaluateBezier ?! please help..

from documentation : EvaluateBezier -> " Generates a list of sample points on a Bezier curve defined by 2 points."

the first parameter to be passed is ControlPoints , an "Array of 4 FVectors (vert1, controlpoint1, controlpoint2, vert2)." so I expected to have to pass an array of Fvector , but the declaration for this parameter is "const FVector * ControlPoints" , therefore a pointer to only one Fvector (I think) .

inside the evaluateBezier function, ControlPoints is treated with ControlPoints[0],ControlPoints[1] ..and so on .

so, how I should declare (and use) the variable to be passed ?

thanks for your help .

Product Version: UE 4.7
Tags:
more ▼

asked May 26 '15 at 10:13 AM in C++ Programming

avatar image

brad4ever
3 1 3 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

When you pass in an array, you are really just passing around a pointer to the first element of that array. It's a bit confusing if you don't understand how arrays work under the hood in C++, but you're on the right track.

You should be able to just declare, populate, and pass in your array like so:

 FVector MyControlPoints[4]; 
 
 // Fill out your control points.
 
 TArray<FVector> OutPoints;
 EvaluateBezier(MyControlPoints, 2, OutPoints);
more ▼

answered May 26 '15 at 02:33 PM

avatar image

AdeptStrain
536 20 4 23

avatar image brad4ever May 26 '15 at 07:47 PM

perfect, thank you so much !

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question