Search:

Type: Posts; User: joaquim

Page 1 of 13 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    3
    Views
    356

    how use GetDIBits()?

    how use the GetDIBits()?
    https://tannerhelland.com/2008/06/18/vb-graphics-programming-0.html
    we can choose the array size:

    'Build a correctly sized array.
    ReDim ImageData(0 To 2, 0 To...
  2. Replies
    5
    Views
    361

    Re: can i write like a cell phone?

    why i didn't get notification??? :(
    thanks to all
  3. Replies
    2
    Views
    1,229

    Re: how calculate the FPS?

    i have these code:

    if (TempTime <= GetTickCount())
    {

    TempTime = GetTickCount() + 10;
    for(int i=0, y=0; i<img.ImageHeight; i++, y++)
    {
    ...
  4. Replies
    2
    Views
    1,229

    how calculate the FPS?

    how calculate the FPS?
  5. Replies
    2
    Views
    551

    Re: how fill a shape?

    i need more than that and learn how to fill a polygon ;)
    i'm doing it with other way... pixel- to-pixel(DIB's) ;)
    but seems limited
  6. Replies
    5
    Views
    361

    can i write like a cell phone?

    when i start writing, on cell phone, i notice 2 things:
    1 - the 1st letter is upper case or after a '.';
    2 - when i use some letters, i can get a word compare list.
    on Windows, i use Win10, is...
  7. Replies
    2
    Views
    551

    how fill a shape?

    using the Polygon() we draw a shape.
    but what is the best function for fill, using an image, a Polygon?
    the CreatePatternBrush() is for HDC and not for Polygon POINTs.
    so what is the best for...
  8. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    i continue testing without success :(
  9. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    damn.. i'm feeling crazy: i can't control the 3 points :(
    i'm trying just draw in a triangle way without success :(
  10. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    185791
  11. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    Object3D Floor({{-470, 255,0}, {-470, 255,1000}, {470, 255,1000},{470, 255,0}});
    Point[0]={-470, 255,0}
    Point[1]= {-470, 255,1000}
    Point[2]= {470, 255,1000}
    Point[3]={470, 255,0}

    'upper-left'...
  12. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    to be honest, i'm just learning using 3D Math(by me and not by school or something) ;)
  13. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    -image removed-
  14. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    good step:
    185755
    like you see the 3rd point isn't correctly calculated :P
    i don't know why. can you explain better?
    only the 3rd
    but at east i have the picture ;)
    i must calculate\divide the...
  15. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    i had more 1 problem, on movement, that i fixed...
    but i need more updates:
    1 - i need understand why i must draw the walls\roofs\floors on right order depending on position(if X is more big than...
  16. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    heres the result:
    185714
  17. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    fixed ;)
    was just the polygons order, depending on view or position:

    if(Roof.pos[0].Y<0)
    {
    Roof.draw(HDCConsole);
    if(Floor.pos[0].Y<0)
    {
    ...
  18. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    i'm sorry Jacob, but can you tell me more?
  19. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    i did these change, but the same bug is showed:

    Object3D Floor({ {-470, 255,1000}, {470, 255,1000},{470, 255,0}, {-470, 255,0}});
    Object3D Roof({ {-470, -200,1000}, {470, -200,1000},{470,...
  20. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    correct me 1 thing: i must draw the walls before the floor\roof... they must have a right order?
    ok.. they are 4 polygons and not 1... but seems that they must have 1 draw order depending on their...
  21. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    "This is my perspective correct texture mapping method I performed long time ago. This does it per pixel and it is accurate:"
    i'm sorry but to much code. ok, you use 'Vertex3D', i use 'position'...
  22. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    heres my code updated... with position and Object3D class's:

    #include <windows.h>
    #include <iostream>
    #include <algorithm>
    #include <vector>
    #include <math.h>
    #include <array>
    #include...
  23. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    Jacob Roman: so what is your advice for draw the texture?
  24. Re: C++: how convert a user class to const POINT*?

    so i must re-invent the position class for do the things more simple in just 1 class ;)
    these class position must do have:
    - 3D position;
    - 3D rotation;
    - perspective.
    so the position class is...
  25. Re: C++: how convert a user class to const POINT*?

    2kaud: ok i read it. but what is for 'operator POINT const'?
  26. Re: C++: how convert a user class to const POINT*?

    i'm sorry but what means '-std=c++2a?(i know these linker command using several tests)
    i'm sorry but theres no way for do:

    int main()
    {
    HDC HDCConsole =GetWindowDC(GetConsoleWindow()); //...
  27. Re: C++: how convert a user class to const POINT*?

    i need use like these:

    Polygon(HDCConsole, DrawPlane.data(), DrawPlane.size());
  28. Re: C++: how convert a user class to const POINT*?

    yes the code, on #6, works fine.. i added 2 lines and get the Console HDC and the polygon, now, it's drawed on center of window:

    #include <vector>
    #include <Windows.h>
    #include <cmath>
    #include...
  29. Re: C++: how convert a user class to const POINT*?

    i'm using Coode Blocks with GNU compiler(don't have C++20):
    185666
  30. Re: C++: how convert a user class to const POINT*?

    i'm sorry, but the problem remains :(

    operator POINT() const
    {
    const float perespective = foco / (Z + foco);

    return POINT( (LONG)std::trunc(X * perespective), (LONG)std::trunc(Y *...
  31. Re: C++: how convert a user class to const POINT*?

    you using the 'for' for convert the 'DrawPlane' to 'mypoints'... so what is doing the 'operator POINT()'?
  32. Re: C++: how convert a user class to const POINT*?

    I'm sorry, but the POINT operator, on position class, don't resolve that?
  33. Re: C++: how convert a user class to const POINT*?

    vector<position> DrawPlane={ {-100, 50,0}, {-100, 50,1000}, {100, 50,1000},{100, 50,0}};
    Polygon(HDCConsole,(POINT*) DrawPlane,DrawPlane.size());
    "error: invalid cast from type...
  34. C++: how convert a user class to const POINT*?

    the Polygon() API function accept the const POINT* on 2nd parameter.
    heres my class:

    class position
    {
    public:
    float X;
    float Y;
    float Z;
    float perespective;
  35. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    hehehe fixed ;)
    i must update my class position... but, for now, i can draw a polygon without problems ;)
    for draw a texture, i can use the the PlgBlt() API function ;)
    but now i must learn more 1...
  36. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    Was hard, honestly, but now is almost done ;)
    Now i must create a polygon position for don't lose the original positions. My class need more work, but it's great.
    Thank you so much for all
  37. Replies
    30
    Views
    1,816

    Re: 3D Math: how calculate the 3D?

    my problem was that i used the 0,0,0 when then 0,0,0 is the center of screen and not the top left corner ;)
    now i'm trying avoid drawing the Z negative position :(
    isn't easy, but i can do it ;)
  38. Replies
    12
    Views
    654

    Re: what are the types symbols?

    thank you so much for all to all
  39. Replies
    12
    Views
    654

    Re: what are the types symbols?

    finally i found it:
    Suffix -> Data Type
    & -> Long
    ! -> Single
    # -> Double
    @ -> Currency

    thank you so much for all
  40. Replies
    12
    Views
    654

    Re: what are the types symbols?

    what are the others please?
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width