CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

# Search:

Type: Posts; User: Cambalinho

Page 1 of 52 1

1. ## Thread: Math 3D: how rotate the 3D vectors?

by Cambalinho
Replies
0
Views
1,413

### Math 3D: how rotate the 3D vectors?

how can i rotate the 3D axis?
i have these 2 functions(i must convert degrees to radians)(forget been VB6 code.. i just need rotate from player position):

Private Function...
2. ## Thread: Math 3D: how get 2D from 3D vectors?

by Cambalinho
Replies
0
Views
1,099

### Math 3D: how get 2D from 3D vectors?

i have a calculation for convert 3D vectors to 2D vectors:
(isn't a C++ code, but you get the point)

Private Function ConvertPositon3DTo2D(Position As Position3D, World3DSize As Size3D) As...
3. ## Thread: how draw 3D just using the math?

by Cambalinho
Replies
13
Views
4,011

### Re: how draw 3D just using the math?

2kaud these function convert the 3D to 2D and add the vector to center of the screen: "+ World3DSize.Width / 2"
if i use the camera position zero(from the window) and the size(from window), how can...
4. ## Thread: how avoiding hidded drawed parts?

by Cambalinho
Replies
0
Views
2,163

### how avoiding hidded drawed parts?

i'm learning how create a 3D world just using Math.
until here i can draw lines and a plane.
now i'm moving the player(nothing, just moving) and the plane is moved. when i get far the plane is...
5. ## Thread: how get the last position?

by Cambalinho
Replies
0
Views
1,620

### how get the last position?

i have 2 positions 3D on NewPosition3D array.
i'm testing if the Z position is outside camera and if is, i must save that position:

If ((NewPosition3D(0).Z) > Camera1.Position.Z) Then
...
6. ## Thread: how convert the 3D point to 2D point?

by Cambalinho
Replies
0
Views
3,058

### how convert the 3D point to 2D point?

i have these function for convert 3D point to 2D point:

Private Function ConvertPositon3DTo2D(Position As Position3D, World3DSize As Size3D) As POINTAPI Dim ConvertedPosition As POINTAPI
...
7. ## Thread: [RESOLVED] how i get point on a 3D line knowing the Z or X or Y?

by Cambalinho
Replies
13
Views
2,919

### Re: [RESOLVED] how i get point on a 3D line knowing the Z or X or Y?

"Just because the points Destiny and Origin are the same.
And it is up to you to prove whether it is possible and if it is then by what conditions."
because i was wrong using the actual line point...
8. ## Thread: [RESOLVED] how i get point on a 3D line knowing the Z or X or Y?

by Cambalinho
Replies
13
Views
2,919

### Re: [RESOLVED] how i get point on a 3D line knowing the Z or X or Y?

wolle see these calculation:
AB.X = Destiny.X - Origin.X
if Destiny is the same of Origin, the AB.X is zero.
yes i test point by point for get the right result... maybe i must use the same line...
9. ## Thread: [RESOLVED] how i get point on a 3D line knowing the Z or X or Y?

by Cambalinho
Replies
13
Views
2,919

### Re: [RESOLVED] how i get point on a 3D line knowing the Z or X or Y?

when:

AB.X = Destiny.X - Origin.X
AB.Y = Destiny.Y - Origin.Y
AB.Z = Destiny.Z - Origin.Z
are zero, how can i calculate the 'T'?

T = (ActualPosition - Origin.X) / AB.X
10. ## Thread: [RESOLVED] how i get point on a 3D line knowing the Z or X or Y?

by Cambalinho
Replies
13
Views
2,919

### Re: [RESOLVED] how i get point on a 3D line knowing the Z or X or Y?

let me ask you anotherthing: when i get the point from GetLinePosition(), i notice 1 thing: the floor isn't there for some Z pixels... so the best is change the player.Z to player.Z-100... i'm tell...
11. ## Thread: [RESOLVED] how create a 3D collision function?

by Cambalinho
Replies
13
Views
2,929

### Re: how create a 3D collision function?

testing and review the code(with more help before of these problems):
1 - the floor is drawed(the left line): from bottom left to top left.. and both have the same X,Y and the Z is changed.;
2 -...
12. ## Thread: [RESOLVED] how i get point on a 3D line knowing the Z or X or Y?

by Cambalinho
Replies
13
Views
2,919

### Re: [RESOLVED] how i get point on a 3D line knowing the Z or X or Y?

when i calculate the 'T', how i know the Z or X or Y is from the line?
is only compare, before calculate the 'T', if Z(or X or Y) belongs between the OriginX and DestinyX?
13. ## Thread: [RESOLVED] how create a 3D collision function?

by Cambalinho
Replies
13
Views
2,929

### Re: how create a 3D collision function?

thanks for all... maybe now the Wolle notice more easy ;)
thank you
14. ## Thread: [RESOLVED] how create a 3D collision function?

by Cambalinho
Replies
13
Views
2,929

### Re: how create a 3D collision function?

wolle?
please VictorN can you disable the 'RESOLVED'?
15. ## Thread: [RESOLVED] how i get point on a 3D line knowing the Z or X or Y?

by Cambalinho
Replies
13
Views
2,919

### Re: how i get point on a 3D line knowing the Z or X or Y?

i'm sorry, but i can't rate you now: forum rules... sorry
16. ## Thread: [RESOLVED] how create a 3D collision function?

by Cambalinho
Replies
13
Views
2,929

### Re: how create a 3D collision function?

thanks VictorN.. thank you
but was only the code or too the language?
17. ## Thread: [RESOLVED] how i get point on a 3D line knowing the Z or X or Y?

by Cambalinho
Replies
13
Views
2,919

### Re: how i get point on a 3D line knowing the Z or X or Y?

thank you so much for all.. thank you.
i get the same result, because the 1st collision point is wrong
but now i have the function corrected:

Private Function GetLinePosition(Origin As...
18. ## Thread: [RESOLVED] how i get point on a 3D line knowing the Z or X or Y?

by Cambalinho
Replies
13
Views
2,919

### Re: how i get point on a 3D line knowing the Z or X or Y?

correct me more things:
- the AB it's the destiny point line minus origin point line, right?
- knowing the Z, how we calculate the T?
T = AB.z - Z
is these correct?
wow i forget the O point.......
19. ## Thread: [RESOLVED] how create a 3D collision function?

by Cambalinho
Replies
13
Views
2,929

### Re: how create a 3D collision function?

i'm sorry, but i need show you something:
(i'm sorry but, for now i'm using VB6... but you understand the code easy)
when i do:

If (IsCollision3D(Camera1.Position, Camera1.Size, Position, Size)...
20. ## Thread: [RESOLVED] how i get point on a 3D line knowing the Z or X or Y?

by Cambalinho
Replies
13
Views
2,919

### [RESOLVED] how i get point on a 3D line knowing the Z or X or Y?

for i get the point on a 3D line, i use these function:

Position3D GetLinePosition(Position3D Origin, Position3D Destiny, double ActualPosition, Coordenates WhatCoordenate = Z){

//...
21. ## Thread: [RESOLVED] how create a 3D collision function?

by Cambalinho
Replies
13
Views
2,929

### Re: how create a 3D collision function?

yes... now it's the same.
thanks for all... now i must create a new topic for the next created function.
thank you
22. ## Thread: [RESOLVED] how create a 3D collision function?

by Cambalinho
Replies
13
Views
2,929

### Re: how create a 3D collision function?

yes i added the parentheses... but seen your code: where is X and Y? maybe it's another way for get the 3D collision...
i'm trying using the same function for see if the line origin is inside the...
23. ## Thread: [RESOLVED] how create a 3D collision function?

by Cambalinho
Replies
13
Views
2,929

### [RESOLVED] how create a 3D collision function?

i did a 3D collision function:

bool IsCollision3D(Position3D ObjectPosition1, Size3D ObjectSize1, Position3D ObjectPosition2, Size3D ObjectSize2) {
return ((ObjectPosition1.X
...
24. ## Thread: how draw 3D just using the math?

by Cambalinho
Replies
13
Views
4,011

### Re: how draw 3D just using the math?

2kaud: true and i have the function updated:

'Draw array Vertices:
Private Type POINTAPI
X As Long
Y As Long
End Type
Private Declare Function Polygon Lib "gdi32" (ByVal hdc As...
25. ## Thread: how draw 3D just using the math?

by Cambalinho
Replies
13
Views
4,011

### Re: how draw 3D just using the math?

why they always use Matrix?
i don't know about it... i didn't learned on school(12º) :(
Results 1 to 25 of 1300
Page 1 of 52 1